-
Notifications
You must be signed in to change notification settings - Fork 1
/
eventsextras.php
79 lines (72 loc) · 2.17 KB
/
eventsextras.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
require_once 'eventsextras.civix.php';
use CRM_EventsExtras_ExtensionUtil as E;
/**
* Implements hook_civicrm_buildForm().
*
* @link hhttps://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_buildForm/
*/
function eventsextras_civicrm_buildForm($formName, &$form) {
$listeners = [
new CRM_EventsExtras_Hook_BuildForm_EventTabHeader(),
new CRM_EventsExtras_Hook_BuildForm_EventInfo(),
new CRM_EventsExtras_Hook_BuildForm_EventFee(),
new CRM_EventsExtras_Hook_BuildForm_EventRegistration(),
];
foreach ($listeners as $currentListener) {
$currentListener->handle($formName, $form);
}
}
/**
* Implements hook_civicrm_pre().
*
* @link hhttps://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_pre/
*/
function eventsextras_civicrm_pre($op, $objectName, $id, &$params) {
$listeners = [
new CRM_EventsExtras_Hook_Pre_ManageEvent(),
];
foreach ($listeners as $currentListener) {
$currentListener->handle($op, $objectName, $id, $params);
}
}
/**
* Implements hook_civicrm_config().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
*/
function eventsextras_civicrm_config(&$config) {
_eventsextras_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_install
*/
function eventsextras_civicrm_install() {
_eventsextras_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_enable
*/
function eventsextras_civicrm_enable() {
_eventsextras_civix_civicrm_enable();
}
/**
* Implements hook_civicrm_navigationMenu().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_navigationMenu
*/
function eventsextras_civicrm_navigationMenu(&$menu) {
_eventsextras_civix_insert_navigation_menu($menu, 'Administer/CiviEvent', array(
'label' => E::ts('Events Extras Settings'),
'name' => 'events_extras_settings',
'url' => 'civicrm/admin/setting/preferences/eventsextras',
'permission' => 'administer CiviCRM',
'operator' => 'OR',
'separator' => 0,
));
_eventsextras_civix_navigationMenu($menu);
}