From 206d4405c1082e768641d31738c6f554641b39d7 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Tue, 13 Jun 2023 14:27:28 -0400 Subject: [PATCH] Use named parameters to simplify the FieldHelper::control() function (CFM-269) (#92) --- app/src/View/Helper/FieldHelper.php | 85 ++++++++++--------- app/templates/ApiUsers/fields.inc | 9 +- .../ExternalIdentityRoles/fields.inc | 6 +- app/templates/Jobs/fields.inc | 57 ++++++------- app/templates/PersonRoles/fields.inc | 2 +- 5 files changed, 79 insertions(+), 80 deletions(-) diff --git a/app/src/View/Helper/FieldHelper.php b/app/src/View/Helper/FieldHelper.php index 437e17575..2329855c7 100644 --- a/app/src/View/Helper/FieldHelper.php +++ b/app/src/View/Helper/FieldHelper.php @@ -78,18 +78,24 @@ public function banner(string $info): string { * @param string $fieldName Form field * @param array $options FormHelper control options * @param string $labelText Label text (fieldName language key used by default) - * @param array $config Custom FormHelper configuration options * @param string $ctrlCode Control code passed in from wrapper functions * @param string $cssClass Start li css class passed in from wrapper functions + * @param string $beforeField Markup to be placed before/above the field + * @param string $afterField Markup to be placed after/below the field + * @param string $prefix Field prefix - used for API Usernames + * @param bool $labelIsTextOnly For fields that should not include