-
-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23862 from eileenmcnaughton/nav
Move creating of nav & menu items to legacycustomsearches extension
- Loading branch information
Showing
10 changed files
with
331 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
|
||
use Civi\Api4\Domain; | ||
use CRM_Legacycustomsearches_ExtensionUtil as E; | ||
|
||
$menuItems = []; | ||
$domains = Domain::get(FALSE) | ||
->addSelect('id') | ||
->execute(); | ||
foreach ($domains as $domain) { | ||
$menuItems[] = [ | ||
'name' => 'Custom Searches' . $domain['id'], | ||
'entity' => 'Navigation', | ||
'cleanup' => 'always', | ||
'update' => 'unmodified', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'label' => E::ts('Custom Searches'), | ||
'name' => 'Custom Searches', | ||
'url' => 'civicrm/contact/search/custom/list?reset=1', | ||
'permission' => NULL, | ||
'permission_operator' => 'OR', | ||
'parent_id.name' => 'Search', | ||
'is_active' => TRUE, | ||
'has_separator' => 2, | ||
'weight' => 15, | ||
'domain_id' => $domain['id'], | ||
], | ||
'match' => ['domain_id', 'name'], | ||
], | ||
]; | ||
$menuItems[] = [ | ||
'name' => 'Manage Custom Searches' . $domain['id'], | ||
'entity' => 'Navigation', | ||
'cleanup' => 'always', | ||
'update' => 'unmodified', | ||
'params' => [ | ||
'version' => 4, | ||
'values' => [ | ||
'label' => E::ts('Manage Custom Searches'), | ||
'name' => 'Manage Custom Searches', | ||
'url' => 'civicrm/admin/options/custom_search?reset=1', | ||
'permission' => 'administer CiviCRM', | ||
'permission_operator' => 'OR', | ||
'parent_id.name' => 'Customize Data and Screens', | ||
'is_active' => TRUE, | ||
'weight' => 15, | ||
'domain_id' => $domain['id'], | ||
], | ||
'match' => ['domain_id', 'name'], | ||
], | ||
]; | ||
} | ||
return $menuItems; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.