3 require_once 'eventcart.civix.php';
5 use CRM_Eventcart_ExtensionUtil
as E
;
9 * Implements hook_civicrm_config().
11 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
13 function eventcart_civicrm_config(&$config) {
14 if (isset(Civi
::$statics[__FUNCTION__
])) {
17 Civi
::$statics[__FUNCTION__
] = 1;
18 // Since as a hidden extension it's always enabled, until this is a "real" extension you can turn off we need to check the legacy setting.
19 if ((bool) Civi
::settings()->get('enable_cart')) {
20 Civi
::dispatcher()->addListener('hook_civicrm_pageRun', 'CRM_Event_Cart_PageCallback::run');
23 _eventcart_civix_civicrm_config($config);
27 * Implements hook_civicrm_xmlMenu().
29 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu
31 function eventcart_civicrm_xmlMenu(&$files) {
32 _eventcart_civix_civicrm_xmlMenu($files);
36 * Implements hook_civicrm_install().
38 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
40 function eventcart_civicrm_install() {
41 _eventcart_civix_civicrm_install();
45 * Implements hook_civicrm_postInstall().
47 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall
49 function eventcart_civicrm_postInstall() {
50 _eventcart_civix_civicrm_postInstall();
54 * Implements hook_civicrm_uninstall().
56 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall
58 function eventcart_civicrm_uninstall() {
59 _eventcart_civix_civicrm_uninstall();
63 * Implements hook_civicrm_enable().
65 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
67 function eventcart_civicrm_enable() {
68 _eventcart_civix_civicrm_enable();
72 * Implements hook_civicrm_disable().
74 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable
76 function eventcart_civicrm_disable() {
77 _eventcart_civix_civicrm_disable();
81 * Implements hook_civicrm_upgrade().
83 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade
85 function eventcart_civicrm_upgrade($op, CRM_Queue_Queue
$queue = NULL) {
86 return _eventcart_civix_civicrm_upgrade($op, $queue);
90 * Implements hook_civicrm_managed().
92 * Generate a list of entities to create/deactivate/delete when this module
93 * is installed, disabled, uninstalled.
95 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed
97 function eventcart_civicrm_managed(&$entities) {
98 _eventcart_civix_civicrm_managed($entities);
102 * Implements hook_civicrm_angularModules().
104 * Generate a list of Angular modules.
106 * Note: This hook only runs in CiviCRM 4.5+. It may
107 * use features only available in v4.6+.
109 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
111 function eventcart_civicrm_angularModules(&$angularModules) {
112 _eventcart_civix_civicrm_angularModules($angularModules);
116 * Implements hook_civicrm_alterSettingsFolders().
118 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterSettingsFolders
120 function eventcart_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) {
121 _eventcart_civix_civicrm_alterSettingsFolders($metaDataFolders);
125 * Implements hook_civicrm_entityTypes().
127 * Declare entity types provided by this module.
129 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
131 function eventcart_civicrm_entityTypes(&$entityTypes) {
132 _eventcart_civix_civicrm_entityTypes($entityTypes);