From 708c2541732beb72d98fccdfd4ef34c5b96ad055 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 30 Nov 2021 18:47:05 -0800 Subject: [PATCH] mixin/menu-xml - Convert live menu-items from `hook_xmlMenu` to `` --- ext/afform/admin/afform_admin.civix.php | 13 ------------- ext/afform/admin/afform_admin.php | 9 --------- ext/afform/admin/info.xml | 3 +++ ext/authx/authx.civix.php | 13 ------------- ext/authx/authx.php | 9 --------- ext/authx/info.xml | 1 + ext/ckeditor4/ckeditor4.civix.php | 13 ------------- ext/ckeditor4/ckeditor4.php | 9 --------- ext/ckeditor4/info.xml | 3 +++ ext/eventcart/eventcart.civix.php | 13 ------------- ext/eventcart/eventcart.php | 9 --------- ext/eventcart/info.xml | 1 + ext/flexmailer/flexmailer.civix.php | 13 ------------- ext/flexmailer/flexmailer.php | 9 --------- ext/flexmailer/info.xml | 1 + ext/legacycustomsearches/info.xml | 3 +++ .../legacycustomsearches.civix.php | 13 ------------- ext/legacycustomsearches/legacycustomsearches.php | 9 --------- ext/message_admin/info.xml | 1 + ext/message_admin/message_admin.civix.php | 13 ------------- ext/message_admin/message_admin.php | 9 --------- ext/oauth-client/info.xml | 1 + ext/oauth-client/oauth_client.civix.php | 13 ------------- ext/oauth-client/oauth_client.php | 9 --------- ext/recaptcha/info.xml | 1 + ext/recaptcha/recaptcha.civix.php | 13 ------------- ext/recaptcha/recaptcha.php | 9 --------- ext/search_kit/info.xml | 1 + ext/search_kit/search_kit.civix.php | 13 ------------- ext/search_kit/search_kit.php | 9 --------- 30 files changed, 16 insertions(+), 220 deletions(-) diff --git a/ext/afform/admin/afform_admin.civix.php b/ext/afform/admin/afform_admin.civix.php index d247b3b77b..54f6001bfd 100644 --- a/ext/afform/admin/afform_admin.civix.php +++ b/ext/afform/admin/afform_admin.civix.php @@ -107,19 +107,6 @@ function _afform_admin_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _afform_admin_civix_civicrm_xmlMenu(&$files) { - foreach (_afform_admin_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/afform/admin/afform_admin.php b/ext/afform/admin/afform_admin.php index b0f8d14bee..4952456376 100644 --- a/ext/afform/admin/afform_admin.php +++ b/ext/afform/admin/afform_admin.php @@ -12,15 +12,6 @@ function afform_admin_civicrm_config(&$config) { _afform_admin_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_xmlMenu - */ -function afform_admin_civicrm_xmlMenu(&$files) { - _afform_admin_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/afform/admin/info.xml b/ext/afform/admin/info.xml index 806499a926..fcd99636a8 100644 --- a/ext/afform/admin/info.xml +++ b/ext/afform/admin/info.xml @@ -29,4 +29,7 @@ + + menu-xml@1.0.0 + diff --git a/ext/authx/authx.civix.php b/ext/authx/authx.civix.php index 15e8814d58..8125d3e527 100644 --- a/ext/authx/authx.civix.php +++ b/ext/authx/authx.civix.php @@ -107,19 +107,6 @@ function _authx_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _authx_civix_civicrm_xmlMenu(&$files) { - foreach (_authx_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/authx/authx.php b/ext/authx/authx.php index 1b3cdefda8..c700178fdb 100644 --- a/ext/authx/authx.php +++ b/ext/authx/authx.php @@ -85,15 +85,6 @@ function authx_civicrm_config(&$config) { _authx_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function authx_civicrm_xmlMenu(&$files) { - _authx_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/authx/info.xml b/ext/authx/info.xml index 4671767aa7..a2b956a60e 100644 --- a/ext/authx/info.xml +++ b/ext/authx/info.xml @@ -25,6 +25,7 @@ + menu-xml@1.0.0 setting-php@1.0.0 diff --git a/ext/ckeditor4/ckeditor4.civix.php b/ext/ckeditor4/ckeditor4.civix.php index 31e512ab5c..cfb03f2d53 100644 --- a/ext/ckeditor4/ckeditor4.civix.php +++ b/ext/ckeditor4/ckeditor4.civix.php @@ -107,19 +107,6 @@ function _ckeditor4_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _ckeditor4_civix_civicrm_xmlMenu(&$files) { - foreach (_ckeditor4_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/ckeditor4/ckeditor4.php b/ext/ckeditor4/ckeditor4.php index 6821a3ff80..b598220941 100644 --- a/ext/ckeditor4/ckeditor4.php +++ b/ext/ckeditor4/ckeditor4.php @@ -14,15 +14,6 @@ function ckeditor4_civicrm_config(&$config) { _ckeditor4_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function ckeditor4_civicrm_xmlMenu(&$files) { - _ckeditor4_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/ckeditor4/info.xml b/ext/ckeditor4/info.xml index 35710d5a36..8c794586fe 100644 --- a/ext/ckeditor4/info.xml +++ b/ext/ckeditor4/info.xml @@ -24,6 +24,9 @@ + + menu-xml@1.0.0 + CRM/Ckeditor4 diff --git a/ext/eventcart/eventcart.civix.php b/ext/eventcart/eventcart.civix.php index ecd1659082..0cc09318f9 100644 --- a/ext/eventcart/eventcart.civix.php +++ b/ext/eventcart/eventcart.civix.php @@ -107,19 +107,6 @@ function _eventcart_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _eventcart_civix_civicrm_xmlMenu(&$files) { - foreach (_eventcart_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/eventcart/eventcart.php b/ext/eventcart/eventcart.php index 9ea338e597..29c45df29d 100644 --- a/ext/eventcart/eventcart.php +++ b/ext/eventcart/eventcart.php @@ -23,15 +23,6 @@ function eventcart_civicrm_config(&$config) { _eventcart_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function eventcart_civicrm_xmlMenu(&$files) { - _eventcart_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/eventcart/info.xml b/ext/eventcart/info.xml index 831f41616b..3c0f3d6d4d 100644 --- a/ext/eventcart/info.xml +++ b/ext/eventcart/info.xml @@ -25,6 +25,7 @@ + menu-xml@1.0.0 setting-php@1.0.0 diff --git a/ext/flexmailer/flexmailer.civix.php b/ext/flexmailer/flexmailer.civix.php index 090e53d9d8..5b82503256 100644 --- a/ext/flexmailer/flexmailer.civix.php +++ b/ext/flexmailer/flexmailer.civix.php @@ -107,19 +107,6 @@ function _flexmailer_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _flexmailer_civix_civicrm_xmlMenu(&$files) { - foreach (_flexmailer_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/flexmailer/flexmailer.php b/ext/flexmailer/flexmailer.php index 3462df4a04..387edf3514 100644 --- a/ext/flexmailer/flexmailer.php +++ b/ext/flexmailer/flexmailer.php @@ -23,15 +23,6 @@ function flexmailer_civicrm_config(&$config) { _flexmailer_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_xmlMenu - */ -function flexmailer_civicrm_xmlMenu(&$files) { - _flexmailer_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/flexmailer/info.xml b/ext/flexmailer/info.xml index db31eb1809..90c1324d68 100644 --- a/ext/flexmailer/info.xml +++ b/ext/flexmailer/info.xml @@ -29,6 +29,7 @@ + menu-xml@1.0.0 setting-php@1.0.0 diff --git a/ext/legacycustomsearches/info.xml b/ext/legacycustomsearches/info.xml index 6df186baf5..ccb1d829fb 100644 --- a/ext/legacycustomsearches/info.xml +++ b/ext/legacycustomsearches/info.xml @@ -28,6 +28,9 @@ + + menu-xml@1.0.0 + CRM/Legacycustomsearches diff --git a/ext/legacycustomsearches/legacycustomsearches.civix.php b/ext/legacycustomsearches/legacycustomsearches.civix.php index fc36a28ca9..0f3227e2f9 100644 --- a/ext/legacycustomsearches/legacycustomsearches.civix.php +++ b/ext/legacycustomsearches/legacycustomsearches.civix.php @@ -107,19 +107,6 @@ function _legacycustomsearches_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _legacycustomsearches_civix_civicrm_xmlMenu(&$files) { - foreach (_legacycustomsearches_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/legacycustomsearches/legacycustomsearches.php b/ext/legacycustomsearches/legacycustomsearches.php index 0318f60392..5930519a4d 100644 --- a/ext/legacycustomsearches/legacycustomsearches.php +++ b/ext/legacycustomsearches/legacycustomsearches.php @@ -14,15 +14,6 @@ function legacycustomsearches_civicrm_config(&$config) { _legacycustomsearches_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function legacycustomsearches_civicrm_xmlMenu(&$files) { - _legacycustomsearches_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/message_admin/info.xml b/ext/message_admin/info.xml index deb1c78283..1c6ea45b7c 100644 --- a/ext/message_admin/info.xml +++ b/ext/message_admin/info.xml @@ -32,6 +32,7 @@ ang-php@1.0.0 + menu-xml@1.0.0 CRM/MessageAdmin diff --git a/ext/message_admin/message_admin.civix.php b/ext/message_admin/message_admin.civix.php index 106201fcbc..d3eb343f48 100644 --- a/ext/message_admin/message_admin.civix.php +++ b/ext/message_admin/message_admin.civix.php @@ -107,19 +107,6 @@ function _message_admin_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _message_admin_civix_civicrm_xmlMenu(&$files) { - foreach (_message_admin_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/message_admin/message_admin.php b/ext/message_admin/message_admin.php index de30fcc211..97fbac4b67 100644 --- a/ext/message_admin/message_admin.php +++ b/ext/message_admin/message_admin.php @@ -14,15 +14,6 @@ function message_admin_civicrm_config(&$config) { _message_admin_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function message_admin_civicrm_xmlMenu(&$files) { - _message_admin_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/oauth-client/info.xml b/ext/oauth-client/info.xml index 433c2fa4ab..2760c2c902 100644 --- a/ext/oauth-client/info.xml +++ b/ext/oauth-client/info.xml @@ -31,6 +31,7 @@ CRM_OAuth_Upgrader ang-php@1.0.0 + menu-xml@1.0.0 setting-php@1.0.0 diff --git a/ext/oauth-client/oauth_client.civix.php b/ext/oauth-client/oauth_client.civix.php index 6f1d853928..bfc3966695 100644 --- a/ext/oauth-client/oauth_client.civix.php +++ b/ext/oauth-client/oauth_client.civix.php @@ -107,19 +107,6 @@ function _oauth_client_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _oauth_client_civix_civicrm_xmlMenu(&$files) { - foreach (_oauth_client_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/oauth-client/oauth_client.php b/ext/oauth-client/oauth_client.php index a89344ba69..de44ad2682 100644 --- a/ext/oauth-client/oauth_client.php +++ b/ext/oauth-client/oauth_client.php @@ -14,15 +14,6 @@ function oauth_client_civicrm_config(&$config) { _oauth_client_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function oauth_client_civicrm_xmlMenu(&$files) { - _oauth_client_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_managed(). * diff --git a/ext/recaptcha/info.xml b/ext/recaptcha/info.xml index 8e9f7e99ed..c3f11bdbbb 100644 --- a/ext/recaptcha/info.xml +++ b/ext/recaptcha/info.xml @@ -25,6 +25,7 @@ + menu-xml@1.0.0 setting-php@1.0.0 diff --git a/ext/recaptcha/recaptcha.civix.php b/ext/recaptcha/recaptcha.civix.php index 0b8fca920c..6a7b39390d 100644 --- a/ext/recaptcha/recaptcha.civix.php +++ b/ext/recaptcha/recaptcha.civix.php @@ -107,19 +107,6 @@ function _recaptcha_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _recaptcha_civix_civicrm_xmlMenu(&$files) { - foreach (_recaptcha_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/recaptcha/recaptcha.php b/ext/recaptcha/recaptcha.php index f1e9875562..eae2c32424 100644 --- a/ext/recaptcha/recaptcha.php +++ b/ext/recaptcha/recaptcha.php @@ -14,15 +14,6 @@ function recaptcha_civicrm_config(&$config) { _recaptcha_civix_civicrm_config($config); } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function recaptcha_civicrm_xmlMenu(&$files) { - _recaptcha_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/search_kit/info.xml b/ext/search_kit/info.xml index d31e49d478..db23837312 100644 --- a/ext/search_kit/info.xml +++ b/ext/search_kit/info.xml @@ -28,6 +28,7 @@ CRM_Search_Upgrader ang-php@1.0.0 + menu-xml@1.0.0 CRM/Search diff --git a/ext/search_kit/search_kit.civix.php b/ext/search_kit/search_kit.civix.php index bafc4c0c8f..898c559606 100644 --- a/ext/search_kit/search_kit.civix.php +++ b/ext/search_kit/search_kit.civix.php @@ -107,19 +107,6 @@ function _search_kit_civix_civicrm_config(&$config = NULL) { set_include_path($include_path); } -/** - * (Delegated) Implements hook_civicrm_xmlMenu(). - * - * @param $files array(string) - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function _search_kit_civix_civicrm_xmlMenu(&$files) { - foreach (_search_kit_civix_glob(__DIR__ . '/xml/Menu/*.xml') as $file) { - $files[] = $file; - } -} - /** * Implements hook_civicrm_install(). * diff --git a/ext/search_kit/search_kit.php b/ext/search_kit/search_kit.php index b296d3cb4d..e67149ea04 100644 --- a/ext/search_kit/search_kit.php +++ b/ext/search_kit/search_kit.php @@ -38,15 +38,6 @@ function search_kit_civicrm_alterApiRoutePermissions(&$permissions, $entity, $ac } } -/** - * Implements hook_civicrm_xmlMenu(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu - */ -function search_kit_civicrm_xmlMenu(&$files) { - _search_kit_civix_civicrm_xmlMenu($files); -} - /** * Implements hook_civicrm_managed(). * -- 2.25.1