*
* @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;
$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.
}
/**
*/
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.
}
/**
*/
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.
}
/**
}
}
}
-
-/**
- * (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',
- ],
- ]);
-}