ext/sequentialcreditnotes - Update to civix v23.02.0
authorTim Otten <totten@civicrm.org>
Fri, 24 Feb 2023 00:47:58 +0000 (16:47 -0800)
committerTim Otten <totten@civicrm.org>
Fri, 24 Feb 2023 00:47:58 +0000 (16:47 -0800)
ext/sequentialcreditnotes/info.xml
ext/sequentialcreditnotes/sequentialcreditnotes.civix.php

index bdfa0a477e60faef0f39837a1d10bbe2ee1d9afe..4b7ce090f25502b830302ce97e2842bbee35fec8 100644 (file)
@@ -28,6 +28,6 @@
   </mixins>
   <civix>
     <namespace>CRM/Sequentialcreditnotes</namespace>
-    <format>22.10.0</format>
+    <format>23.02.0</format>
   </civix>
 </extension>
index e17812d6abf4a43216fc19dce804313150885641..4b35c35b763420465b76accc1db356a161f15623 100644 (file)
@@ -84,27 +84,17 @@ use CRM_Sequentialcreditnotes_ExtensionUtil as E;
  *
  * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config
  */
-function _sequentialcreditnotes_civix_civicrm_config(&$config = NULL) {
+function _sequentialcreditnotes_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 <compatibility>, this does not currently require mixin/polyfill.php.
 }
 
 /**
@@ -114,35 +104,7 @@ function _sequentialcreditnotes_civix_civicrm_config(&$config = NULL) {
  */
 function _sequentialcreditnotes_civix_civicrm_install() {
   _sequentialcreditnotes_civix_civicrm_config();
-  if ($upgrader = _sequentialcreditnotes_civix_upgrader()) {
-    $upgrader->onInstall();
-  }
-}
-
-/**
- * Implements hook_civicrm_postInstall().
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall
- */
-function _sequentialcreditnotes_civix_civicrm_postInstall() {
-  _sequentialcreditnotes_civix_civicrm_config();
-  if ($upgrader = _sequentialcreditnotes_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 _sequentialcreditnotes_civix_civicrm_uninstall(): void {
-  _sequentialcreditnotes_civix_civicrm_config();
-  if ($upgrader = _sequentialcreditnotes_civix_upgrader()) {
-    $upgrader->onUninstall();
-  }
+  // Based on <compatibility>, this does not currently require mixin/polyfill.php.
 }
 
 /**
@@ -152,56 +114,7 @@ function _sequentialcreditnotes_civix_civicrm_uninstall(): void {
  */
 function _sequentialcreditnotes_civix_civicrm_enable(): void {
   _sequentialcreditnotes_civix_civicrm_config();
-  if ($upgrader = _sequentialcreditnotes_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 _sequentialcreditnotes_civix_civicrm_disable(): void {
-  _sequentialcreditnotes_civix_civicrm_config();
-  if ($upgrader = _sequentialcreditnotes_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 _sequentialcreditnotes_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) {
-  if ($upgrader = _sequentialcreditnotes_civix_upgrader()) {
-    return $upgrader->onUpgrade($op, $queue);
-  }
-}
-
-/**
- * @return CRM_Sequentialcreditnotes_Upgrader
- */
-function _sequentialcreditnotes_civix_upgrader() {
-  if (!file_exists(__DIR__ . '/CRM/Sequentialcreditnotes/Upgrader.php')) {
-    return NULL;
-  }
-  else {
-    return CRM_Sequentialcreditnotes_Upgrader_Base::instance();
-  }
+  // Based on <compatibility>, this does not currently require mixin/polyfill.php.
 }
 
 /**
@@ -285,14 +198,3 @@ function _sequentialcreditnotes_civix_fixNavigationMenuItems(&$nodes, &$maxNavID
     }
   }
 }
-
-/**
- * (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 _sequentialcreditnotes_civix_civicrm_entityTypes(&$entityTypes) {
-  $entityTypes = array_merge($entityTypes, []);
-}