Merge pull request #18852 from eileenmcnaughton/aip
[civicrm-core.git] / ext / eventcart / eventcart.php
1 <?php
2
3 require_once 'eventcart.civix.php';
4 // phpcs:disable
5 use CRM_Eventcart_ExtensionUtil as E;
6 // phpcs:enable
7
8 /**
9 * Implements hook_civicrm_config().
10 *
11 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
12 */
13 function eventcart_civicrm_config(&$config) {
14 if (isset(Civi::$statics[__FUNCTION__])) {
15 return;
16 }
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');
21 }
22
23 _eventcart_civix_civicrm_config($config);
24 }
25
26 /**
27 * Implements hook_civicrm_xmlMenu().
28 *
29 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu
30 */
31 function eventcart_civicrm_xmlMenu(&$files) {
32 _eventcart_civix_civicrm_xmlMenu($files);
33 }
34
35 /**
36 * Implements hook_civicrm_install().
37 *
38 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
39 */
40 function eventcart_civicrm_install() {
41 _eventcart_civix_civicrm_install();
42 }
43
44 /**
45 * Implements hook_civicrm_postInstall().
46 *
47 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall
48 */
49 function eventcart_civicrm_postInstall() {
50 _eventcart_civix_civicrm_postInstall();
51 }
52
53 /**
54 * Implements hook_civicrm_uninstall().
55 *
56 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall
57 */
58 function eventcart_civicrm_uninstall() {
59 _eventcart_civix_civicrm_uninstall();
60 }
61
62 /**
63 * Implements hook_civicrm_enable().
64 *
65 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
66 */
67 function eventcart_civicrm_enable() {
68 _eventcart_civix_civicrm_enable();
69 }
70
71 /**
72 * Implements hook_civicrm_disable().
73 *
74 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable
75 */
76 function eventcart_civicrm_disable() {
77 _eventcart_civix_civicrm_disable();
78 }
79
80 /**
81 * Implements hook_civicrm_upgrade().
82 *
83 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade
84 */
85 function eventcart_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) {
86 return _eventcart_civix_civicrm_upgrade($op, $queue);
87 }
88
89 /**
90 * Implements hook_civicrm_managed().
91 *
92 * Generate a list of entities to create/deactivate/delete when this module
93 * is installed, disabled, uninstalled.
94 *
95 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed
96 */
97 function eventcart_civicrm_managed(&$entities) {
98 _eventcart_civix_civicrm_managed($entities);
99 }
100
101 /**
102 * Implements hook_civicrm_angularModules().
103 *
104 * Generate a list of Angular modules.
105 *
106 * Note: This hook only runs in CiviCRM 4.5+. It may
107 * use features only available in v4.6+.
108 *
109 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_angularModules
110 */
111 function eventcart_civicrm_angularModules(&$angularModules) {
112 _eventcart_civix_civicrm_angularModules($angularModules);
113 }
114
115 /**
116 * Implements hook_civicrm_alterSettingsFolders().
117 *
118 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_alterSettingsFolders
119 */
120 function eventcart_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) {
121 _eventcart_civix_civicrm_alterSettingsFolders($metaDataFolders);
122 }
123
124 /**
125 * Implements hook_civicrm_entityTypes().
126 *
127 * Declare entity types provided by this module.
128 *
129 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
130 */
131 function eventcart_civicrm_entityTypes(&$entityTypes) {
132 _eventcart_civix_civicrm_entityTypes($entityTypes);
133 }