Skip to content

Commit

Permalink
Simplify managed menu
Browse files Browse the repository at this point in the history
Domain wrangling is no longer needed thanks to civicrm/civicrm-core#27876
  • Loading branch information
colemanw committed Oct 21, 2023
1 parent 8be738f commit ed55baa
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions managed/Navigation_recent_items.mgd.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<?php
use CRM_Recentmenu_ExtensionUtil as E;

$menuItems = [];
$domains = \Civi\Api4\Domain::get(FALSE)
->addSelect('id')
->execute();
foreach ($domains as $domain) {
$menuItems[] = [
'name' => 'Navigation_recent_items_domain_' . $domain['id'],
return [
[
'name' => 'Navigation_recent_items',
'entity' => 'Navigation',
'cleanup' => 'always',
'update' => 'unmodified',
Expand All @@ -19,13 +15,9 @@
'url' => NULL,
'icon' => 'crm-i fa-history',
'permission' => ['access CiviCRM'],
'permission_operator' => '',
'is_active' => TRUE,
'has_separator' => NULL,
'parent_id' => NULL,
'domain_id' => $domain['id'],
],
'match' => ['name', 'domain_id'],
],
];
}
return $menuItems;
],
];

0 comments on commit ed55baa

Please sign in to comment.