Skip to content

Commit

Permalink
get Entity Label using CoreUtil::getInfoItem
Browse files Browse the repository at this point in the history
  • Loading branch information
ufundo committed Dec 16, 2024
1 parent 86be28a commit 1bac07c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/afform/core/Civi/Api4/Action/CustomGroup/GetAfforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,11 @@ private function generateCreateForm($item): array {
}

private function generateTabForm($item): array {
$extendsLabel = CoreUtil::getInfoItem($item['extends'], 'title');
$afform = [
// name required to replace the existing tab
'name' => 'afsearchTabCustom_' . $item['name'],
'description' => E::ts('%1 tab display for %2', [1 => $item['extends'], 2 => $item['title']]),
'description' => E::ts('%1 tab display for %2', [1 => $extendsLabel, 2 => $item['title']]),
'type' => 'search',
'is_public' => FALSE,
// Q: should this be more permissive if user has access
Expand Down

0 comments on commit 1bac07c

Please sign in to comment.