From e39a91e4770a71fa2533bfd95a8d85b29bd0ec61 Mon Sep 17 00:00:00 2001 From: Jens Schuppe Date: Tue, 26 Sep 2023 12:35:34 +0200 Subject: [PATCH] Add navigation menu items --- info.xml | 1 + .../Navigation__twingle_configuration.mgd.php | 93 +++++++++++++++++++ xml/Menu/twingle.xml | 2 +- 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 managed/Navigation__twingle_configuration.mgd.php diff --git a/info.xml b/info.xml index abcb061..145475e 100644 --- a/info.xml +++ b/info.xml @@ -31,6 +31,7 @@ menu-xml@1.0.0 + mgd-php@1.0.0 diff --git a/managed/Navigation__twingle_configuration.mgd.php b/managed/Navigation__twingle_configuration.mgd.php new file mode 100644 index 0000000..be2d284 --- /dev/null +++ b/managed/Navigation__twingle_configuration.mgd.php @@ -0,0 +1,93 @@ +. + */ + +use CRM_Twingle_ExtensionUtil as E; + +return [ + [ + 'name' => 'Navigation__twingle_configuration', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'domain_id' => 'current_domain', + 'label' => E::ts('Twingle API Configuration'), + 'name' => 'twingle_configuration', + 'url' => 'civicrm/admin/settings/twingle', + 'icon' => NULL, + 'permission' => [ + 'administer CiviCRM', + ], + 'permission_operator' => 'OR', + 'parent_id.name' => 'CiviContribute', + 'is_active' => TRUE, + 'has_separator' => 0, + ], + 'match' => ['name', 'parent_id'], + ], + ], + [ + 'name' => 'Navigation__twingle_settings', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'domain_id' => 'current_domain', + 'label' => E::ts('Twingle API Settings'), + 'name' => 'twingle_settings', + 'url' => 'civicrm/admin/settings/twingle/settings', + 'icon' => NULL, + 'permission' => [ + 'administer CiviCRM', + ], + 'permission_operator' => 'OR', + 'parent_id.name' => 'twingle_configuration', + 'is_active' => TRUE, + 'has_separator' => 0, + ], + 'match' => ['name', 'parent_id'], + ], + ], + [ + 'name' => 'Navigation__twingle_profiles', + 'entity' => 'Navigation', + 'cleanup' => 'unused', + 'update' => 'unmodified', + 'params' => [ + 'version' => 4, + 'values' => [ + 'domain_id' => 'current_domain', + 'label' => E::ts('Twingle API Profiles'), + 'name' => 'twingle_profiles', + 'url' => 'civicrm/admin/settings/twingle/profiles', + 'icon' => NULL, + 'permission' => [ + 'administer CiviCRM', + ], + 'permission_operator' => 'OR', + 'parent_id.name' => 'twingle_configuration', + 'is_active' => TRUE, + 'has_separator' => 0, + ], + 'match' => ['name', 'parent_id'], + ], + ], +]; diff --git a/xml/Menu/twingle.xml b/xml/Menu/twingle.xml index 80529df..f1bc0a9 100644 --- a/xml/Menu/twingle.xml +++ b/xml/Menu/twingle.xml @@ -6,7 +6,7 @@ Twingle API Configuration administer CiviCRM Configure the Twingle API extension - System Settings + CiviContribute admin/option.png