Merge pull request #18852 from eileenmcnaughton/aip
[civicrm-core.git] / ext / eventcart / eventcart.php
CommitLineData
77458d26 1<?php
2
3require_once 'eventcart.civix.php';
4// phpcs:disable
5use 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 */
13function eventcart_civicrm_config(&$config) {
b8f2a197
MW
14 if (isset(Civi::$statics[__FUNCTION__])) {
15 return;
16 }
17 Civi::$statics[__FUNCTION__] = 1;
023f2c03 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 }
b8f2a197 22
77458d26 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 */
31function 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 */
40function 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 */
49function 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 */
58function 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 */
67function 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 */
76function 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 */
85function 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 */
97function eventcart_civicrm_managed(&$entities) {
98 _eventcart_civix_civicrm_managed($entities);
99}
100
77458d26 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 */
111function 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 */
120function 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 */
131function eventcart_civicrm_entityTypes(&$entityTypes) {
132 _eventcart_civix_civicrm_entityTypes($entityTypes);
133}