From fdc476c40e062e105b86e2f444df536bbedaa7e8 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Thu, 23 Feb 2023 16:44:22 -0800 Subject: [PATCH] ext/civicrm_admin_ui - Update to civix v23.02.0 --- .../civicrm_admin_ui.civix.php | 106 +----------------- ext/civicrm_admin_ui/civicrm_admin_ui.php | 11 -- ext/civicrm_admin_ui/info.xml | 2 +- 3 files changed, 5 insertions(+), 114 deletions(-) diff --git a/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php b/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php index ef54bbc93e..69a952d2b2 100644 --- a/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php +++ b/ext/civicrm_admin_ui/civicrm_admin_ui.civix.php @@ -84,27 +84,17 @@ use CRM_CivicrmAdminUi_ExtensionUtil as E; * * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config */ -function _civicrm_admin_ui_civix_civicrm_config(&$config = NULL) { +function _civicrm_admin_ui_civix_civicrm_config($config = NULL) { static $configured = FALSE; if ($configured) { return; } $configured = TRUE; - $template = CRM_Core_Smarty::singleton(); - $extRoot = __DIR__ . DIRECTORY_SEPARATOR; - $extDir = $extRoot . 'templates'; - - if (is_array($template->template_dir)) { - array_unshift($template->template_dir, $extDir); - } - else { - $template->template_dir = [$extDir, $template->template_dir]; - } - $include_path = $extRoot . PATH_SEPARATOR . get_include_path(); set_include_path($include_path); + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -114,35 +104,7 @@ function _civicrm_admin_ui_civix_civicrm_config(&$config = NULL) { */ function _civicrm_admin_ui_civix_civicrm_install() { _civicrm_admin_ui_civix_civicrm_config(); - if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { - $upgrader->onInstall(); - } -} - -/** - * Implements hook_civicrm_postInstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall - */ -function _civicrm_admin_ui_civix_civicrm_postInstall() { - _civicrm_admin_ui_civix_civicrm_config(); - if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { - if (is_callable([$upgrader, 'onPostInstall'])) { - $upgrader->onPostInstall(); - } - } -} - -/** - * Implements hook_civicrm_uninstall(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall - */ -function _civicrm_admin_ui_civix_civicrm_uninstall(): void { - _civicrm_admin_ui_civix_civicrm_config(); - if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { - $upgrader->onUninstall(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -152,56 +114,7 @@ function _civicrm_admin_ui_civix_civicrm_uninstall(): void { */ function _civicrm_admin_ui_civix_civicrm_enable(): void { _civicrm_admin_ui_civix_civicrm_config(); - if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { - if (is_callable([$upgrader, 'onEnable'])) { - $upgrader->onEnable(); - } - } -} - -/** - * (Delegated) Implements hook_civicrm_disable(). - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable - * @return mixed - */ -function _civicrm_admin_ui_civix_civicrm_disable(): void { - _civicrm_admin_ui_civix_civicrm_config(); - if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { - if (is_callable([$upgrader, 'onDisable'])) { - $upgrader->onDisable(); - } - } -} - -/** - * (Delegated) Implements hook_civicrm_upgrade(). - * - * @param $op string, the type of operation being performed; 'check' or 'enqueue' - * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks - * - * @return mixed - * based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending) - * for 'enqueue', returns void - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade - */ -function _civicrm_admin_ui_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { - if ($upgrader = _civicrm_admin_ui_civix_upgrader()) { - return $upgrader->onUpgrade($op, $queue); - } -} - -/** - * @return CRM_CivicrmAdminUi_Upgrader - */ -function _civicrm_admin_ui_civix_upgrader() { - if (!file_exists(__DIR__ . '/CRM/CivicrmAdminUi/Upgrader.php')) { - return NULL; - } - else { - return CRM_CivicrmAdminUi_Upgrader_Base::instance(); - } + // Based on , this does not currently require mixin/polyfill.php. } /** @@ -285,14 +198,3 @@ function _civicrm_admin_ui_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $pa } } } - -/** - * (Delegated) Implements hook_civicrm_entityTypes(). - * - * Find any *.entityType.php files, merge their content, and return. - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes - */ -function _civicrm_admin_ui_civix_civicrm_entityTypes(&$entityTypes) { - $entityTypes = array_merge($entityTypes, []); -} diff --git a/ext/civicrm_admin_ui/civicrm_admin_ui.php b/ext/civicrm_admin_ui/civicrm_admin_ui.php index 456b78b883..85db9c3277 100644 --- a/ext/civicrm_admin_ui/civicrm_admin_ui.php +++ b/ext/civicrm_admin_ui/civicrm_admin_ui.php @@ -13,14 +13,3 @@ use CRM_CivicrmAdminUi_ExtensionUtil as E; function civicrm_admin_ui_civicrm_config(&$config) { _civicrm_admin_ui_civix_civicrm_config($config); } - -/** - * Implements hook_civicrm_entityTypes(). - * - * Declare entity types provided by this module. - * - * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes - */ -function civicrm_admin_ui_civicrm_entityTypes(&$entityTypes) { - _civicrm_admin_ui_civix_civicrm_entityTypes($entityTypes); -} diff --git a/ext/civicrm_admin_ui/info.xml b/ext/civicrm_admin_ui/info.xml index b8aa5cb043..b5b543de8d 100644 --- a/ext/civicrm_admin_ui/info.xml +++ b/ext/civicrm_admin_ui/info.xml @@ -32,7 +32,7 @@ CRM/CivicrmAdminUi crmCivicrmAdminUi - 22.10.0 + 23.02.0 mgd-php@1.0.0 -- 2.25.1