Commit | Line | Data |
---|---|---|
8521225a TO |
1 | <?php |
2 | ||
fe598fad | 3 | require_once 'message_admin.civix.php'; |
8521225a | 4 | // phpcs:disable |
bdff1ee3 | 5 | use CRM_MessageAdmin_ExtensionUtil as E; |
8521225a TO |
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 | */ | |
2f25ab3d TO |
13 | function message_admin_civicrm_config(&$config) { |
14 | _message_admin_civix_civicrm_config($config); | |
8521225a TO |
15 | } |
16 | ||
8521225a TO |
17 | /** |
18 | * Implements hook_civicrm_install(). | |
19 | * | |
20 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install | |
21 | */ | |
2f25ab3d TO |
22 | function message_admin_civicrm_install() { |
23 | _message_admin_civix_civicrm_install(); | |
8521225a TO |
24 | } |
25 | ||
26 | /** | |
27 | * Implements hook_civicrm_postInstall(). | |
28 | * | |
29 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall | |
30 | */ | |
2f25ab3d TO |
31 | function message_admin_civicrm_postInstall() { |
32 | _message_admin_civix_civicrm_postInstall(); | |
8521225a TO |
33 | } |
34 | ||
35 | /** | |
36 | * Implements hook_civicrm_uninstall(). | |
37 | * | |
38 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall | |
39 | */ | |
2f25ab3d TO |
40 | function message_admin_civicrm_uninstall() { |
41 | _message_admin_civix_civicrm_uninstall(); | |
8521225a TO |
42 | } |
43 | ||
44 | /** | |
45 | * Implements hook_civicrm_enable(). | |
46 | * | |
47 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable | |
48 | */ | |
2f25ab3d TO |
49 | function message_admin_civicrm_enable() { |
50 | _message_admin_civix_civicrm_enable(); | |
8521225a TO |
51 | } |
52 | ||
53 | /** | |
54 | * Implements hook_civicrm_disable(). | |
55 | * | |
56 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable | |
57 | */ | |
2f25ab3d TO |
58 | function message_admin_civicrm_disable() { |
59 | _message_admin_civix_civicrm_disable(); | |
8521225a TO |
60 | } |
61 | ||
62 | /** | |
63 | * Implements hook_civicrm_upgrade(). | |
64 | * | |
65 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade | |
66 | */ | |
2f25ab3d TO |
67 | function message_admin_civicrm_upgrade($op, CRM_Queue_Queue $queue = NULL) { |
68 | return _message_admin_civix_civicrm_upgrade($op, $queue); | |
8521225a TO |
69 | } |
70 | ||
8521225a TO |
71 | /** |
72 | * Implements hook_civicrm_entityTypes(). | |
73 | * | |
74 | * Declare entity types provided by this module. | |
75 | * | |
76 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes | |
77 | */ | |
2f25ab3d TO |
78 | function message_admin_civicrm_entityTypes(&$entityTypes) { |
79 | _message_admin_civix_civicrm_entityTypes($entityTypes); | |
8521225a TO |
80 | } |
81 | ||
8521225a TO |
82 | // --- Functions below this ship commented out. Uncomment as required. --- |
83 | ||
84 | /** | |
85 | * Implements hook_civicrm_preProcess(). | |
86 | * | |
87 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_preProcess | |
88 | */ | |
2f25ab3d | 89 | //function message_admin_civicrm_preProcess($formName, &$form) { |
8521225a TO |
90 | // |
91 | //} | |
92 | ||
93 | /** | |
94 | * Implements hook_civicrm_navigationMenu(). | |
95 | * | |
96 | * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu | |
97 | */ | |
2f25ab3d TO |
98 | //function message_admin_civicrm_navigationMenu(&$menu) { |
99 | // _message_admin_civix_insert_navigation_menu($menu, 'Mailings', array( | |
8521225a TO |
100 | // 'label' => E::ts('New subliminal message'), |
101 | // 'name' => 'mailing_subliminal_message', | |
102 | // 'url' => 'civicrm/mailing/subliminal', | |
103 | // 'permission' => 'access CiviMail', | |
104 | // 'operator' => 'OR', | |
105 | // 'separator' => 0, | |
106 | // )); | |
2f25ab3d | 107 | // _message_admin_civix_navigationMenu($menu); |
8521225a | 108 | //} |
cde5ee2e | 109 | |
0dd1fdd5 TO |
110 | /** |
111 | * Mark these fields as translateable. | |
112 | * @see CRM_Utils_Hook::translateFields | |
113 | */ | |
2f25ab3d | 114 | function message_admin_civicrm_translateFields(&$fields) { |
cde5ee2e TO |
115 | $fields['civicrm_msg_template']['msg_subject'] = TRUE; |
116 | $fields['civicrm_msg_template']['msg_text'] = TRUE; | |
117 | $fields['civicrm_msg_template']['msg_html'] = TRUE; | |
118 | } |