forked from ginkgostreet/com.ginkgostreet.giftmembership
-
Notifications
You must be signed in to change notification settings - Fork 0
/
giftmembership.php
104 lines (93 loc) · 3.02 KB
/
giftmembership.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
require_once 'giftmembership.civix.php';
use CRM_Giftmembership_ExtensionUtil as E;
/**
* Implements hook_civicrm_config().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
*/
function giftmembership_civicrm_config(&$config) {
_giftmembership_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_install
*/
function giftmembership_civicrm_install() {
_giftmembership_civix_civicrm_install();
}
/**
* Implements hook_civicrm_postInstall().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_postInstall
*/
function giftmembership_civicrm_postInstall() {
_giftmembership_civix_civicrm_postInstall();
}
/**
* Implements hook_civicrm_uninstall().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_uninstall
*/
function giftmembership_civicrm_uninstall() {
_giftmembership_civix_civicrm_uninstall();
}
/**
* Implements hook_civicrm_enable().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_enable
*/
function giftmembership_civicrm_enable() {
_giftmembership_civix_civicrm_enable();
}
/**
* Implements hook_civicrm_disable().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_disable
*/
function giftmembership_civicrm_disable() {
_giftmembership_civix_civicrm_disable();
}
/**
* Implements hook_civicrm_upgrade().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_upgrade
*/
function giftmembership_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) {
return _giftmembership_civix_civicrm_upgrade($op, $queue);
}
/**
* Implements hook_civicrm_navigationMenu().
*
* @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_navigationMenu
*/
function giftmembership_civicrm_navigationMenu(&$menu) {
_giftmembership_civix_insert_navigation_menu($menu, 'Administer/CiviMember', array(
'label' => E::ts('Gift Membership Settings'),
'name' => 'giftmembership_settings',
'url' => 'civicrm/admin/member/giftmembership',
'permission' => 'access CiviMember',
'separator' => TRUE,
));
_giftmembership_civix_navigationMenu($menu);
}
/**
* Implements hook_civicrm_container().
*
* Used to set up listeners for DAO events.
*
* @link https://docs.civicrm.org/dev/en/master/hooks/hook_civicrm_container/
*/
function giftmembership_civicrm_container($container) {
$container->findDefinition('dispatcher')->addMethodCall('addListener', array('civi.dao.postInsert', array('CRM_Giftmembership_Listener_MembershipPayment', 'onUpsert')));
$container->findDefinition('dispatcher')->addMethodCall('addListener', array('civi.dao.postUpdate', array('CRM_Giftmembership_Listener_MembershipPayment', 'onUpsert')));
}
/**
* Implements hook_civicrm_entityTypes().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
*/
function giftmembership_civicrm_entityTypes(&$entityTypes) {
_giftmembership_civix_civicrm_entityTypes($entityTypes);
}