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

index 0b066cd2fa0f04c8b377b162cc8bd6c410f2309c..2b49bd6d7a27a118f5a7bdd42e521a2b2640b52e 100644 (file)
@@ -84,7 +84,7 @@ use CRM_Grant_ExtensionUtil as E;
  *
  * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config
  */
-function _civigrant_civix_civicrm_config(&$config = NULL) {
+function _civigrant_civix_civicrm_config($config = NULL) {
   static $configured = FALSE;
   if ($configured) {
     return;
@@ -94,6 +94,7 @@ function _civigrant_civix_civicrm_config(&$config = NULL) {
   $extRoot = __DIR__ . DIRECTORY_SEPARATOR;
   $include_path = $extRoot . PATH_SEPARATOR . get_include_path();
   set_include_path($include_path);
+  // Based on <compatibility>, this does not currently require mixin/polyfill.php.
 }
 
 /**
@@ -103,35 +104,7 @@ function _civigrant_civix_civicrm_config(&$config = NULL) {
  */
 function _civigrant_civix_civicrm_install() {
   _civigrant_civix_civicrm_config();
-  if ($upgrader = _civigrant_civix_upgrader()) {
-    $upgrader->onInstall();
-  }
-}
-
-/**
- * Implements hook_civicrm_postInstall().
- *
- * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall
- */
-function _civigrant_civix_civicrm_postInstall() {
-  _civigrant_civix_civicrm_config();
-  if ($upgrader = _civigrant_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 _civigrant_civix_civicrm_uninstall(): void {
-  _civigrant_civix_civicrm_config();
-  if ($upgrader = _civigrant_civix_upgrader()) {
-    $upgrader->onUninstall();
-  }
+  // Based on <compatibility>, this does not currently require mixin/polyfill.php.
 }
 
 /**
@@ -141,56 +114,7 @@ function _civigrant_civix_civicrm_uninstall(): void {
  */
 function _civigrant_civix_civicrm_enable(): void {
   _civigrant_civix_civicrm_config();
-  if ($upgrader = _civigrant_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 _civigrant_civix_civicrm_disable(): void {
-  _civigrant_civix_civicrm_config();
-  if ($upgrader = _civigrant_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 _civigrant_civix_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) {
-  if ($upgrader = _civigrant_civix_upgrader()) {
-    return $upgrader->onUpgrade($op, $queue);
-  }
-}
-
-/**
- * @return CRM_Grant_Upgrader
- */
-function _civigrant_civix_upgrader() {
-  if (!file_exists(__DIR__ . '/CRM/Grant/Upgrader.php')) {
-    return NULL;
-  }
-  else {
-    return CRM_Grant_Upgrader_Base::instance();
-  }
+  // Based on <compatibility>, this does not currently require mixin/polyfill.php.
 }
 
 /**
@@ -274,20 +198,3 @@ function _civigrant_civix_fixNavigationMenuItems(&$nodes, &$maxNavID, $parentID)
     }
   }
 }
-
-/**
- * (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 _civigrant_civix_civicrm_entityTypes(&$entityTypes) {
-  $entityTypes = array_merge($entityTypes, [
-    'CRM_Grant_DAO_Grant' => [
-      'name' => 'Grant',
-      'class' => 'CRM_Grant_DAO_Grant',
-      'table' => 'civicrm_grant',
-    ],
-  ]);
-}
index bd14f68621a777c670131bef1b58e6bfed90ee03..9f4ca39e70fbd55c40570c5df9c78d6290837ce0 100644 (file)
@@ -12,17 +12,6 @@ function civigrant_civicrm_config(&$config) {
   _civigrant_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 civigrant_civicrm_entityTypes(&$entityTypes) {
-  _civigrant_civix_civicrm_entityTypes($entityTypes);
-}
-
 /**
  * Implements hook_civicrm_links().
  *
index 6d6be82dc04c5ca158fa0260d1691ee035e016e2..7e973b2739324713012463aa330a8812fb69f521 100644 (file)
     <mixin>mgd-php@1.0.0</mixin>
     <mixin>afform-entity-php@1.0.0</mixin>
     <mixin>smarty-v2@1.0.0</mixin>
+    <mixin>entity-types-php@1.0.0</mixin>
   </mixins>
   <civix>
     <namespace>CRM/Grant</namespace>
-    <format>22.10.0</format>
+    <format>23.02.0</format>
   </civix>
 </extension>