3 require_once 'message_admin.civix.php';
5 use CRM_MessageAdmin_ExtensionUtil
as E
;
9 * Implements hook_civicrm_config().
11 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
13 function message_admin_civicrm_config(&$config) {
14 _message_admin_civix_civicrm_config($config);
18 * Implements hook_civicrm_xmlMenu().
20 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu
22 function message_admin_civicrm_xmlMenu(&$files) {
23 _message_admin_civix_civicrm_xmlMenu($files);
27 * Implements hook_civicrm_install().
29 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
31 function message_admin_civicrm_install() {
32 _message_admin_civix_civicrm_install();
36 * Implements hook_civicrm_postInstall().
38 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_postInstall
40 function message_admin_civicrm_postInstall() {
41 _message_admin_civix_civicrm_postInstall();
45 * Implements hook_civicrm_uninstall().
47 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_uninstall
49 function message_admin_civicrm_uninstall() {
50 _message_admin_civix_civicrm_uninstall();
54 * Implements hook_civicrm_enable().
56 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
58 function message_admin_civicrm_enable() {
59 _message_admin_civix_civicrm_enable();
63 * Implements hook_civicrm_disable().
65 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_disable
67 function message_admin_civicrm_disable() {
68 _message_admin_civix_civicrm_disable();
72 * Implements hook_civicrm_upgrade().
74 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_upgrade
76 function message_admin_civicrm_upgrade($op, CRM_Queue_Queue
$queue = NULL) {
77 return _message_admin_civix_civicrm_upgrade($op, $queue);
81 * Implements hook_civicrm_managed().
83 * Generate a list of entities to create/deactivate/delete when this module
84 * is installed, disabled, uninstalled.
86 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_managed
88 function message_admin_civicrm_managed(&$entities) {
89 _message_admin_civix_civicrm_managed($entities);
93 * Implements hook_civicrm_caseTypes().
95 * Generate a list of case-types.
97 * Note: This hook only runs in CiviCRM 4.4+.
99 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_caseTypes
101 function message_admin_civicrm_caseTypes(&$caseTypes) {
102 _message_admin_civix_civicrm_caseTypes($caseTypes);
106 * Implements hook_civicrm_entityTypes().
108 * Declare entity types provided by this module.
110 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_entityTypes
112 function message_admin_civicrm_entityTypes(&$entityTypes) {
113 _message_admin_civix_civicrm_entityTypes($entityTypes);
117 * Implements hook_civicrm_themes().
119 function message_admin_civicrm_themes(&$themes) {
120 _message_admin_civix_civicrm_themes($themes);
123 // --- Functions below this ship commented out. Uncomment as required. ---
126 * Implements hook_civicrm_preProcess().
128 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_preProcess
130 //function message_admin_civicrm_preProcess($formName, &$form) {
135 * Implements hook_civicrm_navigationMenu().
137 * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu
139 //function message_admin_civicrm_navigationMenu(&$menu) {
140 // _message_admin_civix_insert_navigation_menu($menu, 'Mailings', array(
141 // 'label' => E::ts('New subliminal message'),
142 // 'name' => 'mailing_subliminal_message',
143 // 'url' => 'civicrm/mailing/subliminal',
144 // 'permission' => 'access CiviMail',
145 // 'operator' => 'OR',
148 // _message_admin_civix_navigationMenu($menu);
152 * Mark these fields as translateable.
153 * @see CRM_Utils_Hook::translateFields
155 function message_admin_civicrm_translateFields(&$fields) {
156 $fields['civicrm_msg_template']['msg_subject'] = TRUE;
157 $fields['civicrm_msg_template']['msg_text'] = TRUE;
158 $fields['civicrm_msg_template']['msg_html'] = TRUE;