-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheckalert.php
More file actions
72 lines (65 loc) · 1.98 KB
/
Copy pathcheckalert.php
File metadata and controls
72 lines (65 loc) · 1.98 KB
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
<?php
require_once 'checkalert.civix.php';
use CRM_Checkalert_ExtensionUtil as E;
use Civi\Checkalert\ServiceProvider;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Implements hook_civicrm_config().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
*/
function checkalert_civicrm_config(&$config): void {
_checkalert_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_container().
*
* Registers a listener on hook_civicrm_check at the lowest possible
* priority (see Civi\Checkalert\ServiceProvider), so it runs after every
* other check has added its messages and can remove any that the admin
* has chosen to suppress (Administer > System Settings > Check Alert
* Settings).
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_container/
*/
function checkalert_civicrm_container(ContainerBuilder $container): void {
ServiceProvider::register($container);
}
/**
* Implements hook_civicrm_navigationMenu().
*
* Adds a "Check Alert Settings" item under Administer > System Settings.
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_navigationMenu/
*/
function checkalert_civicrm_navigationMenu(&$menu): void {
_checkalert_civix_insert_navigation_menu(
$menu,
'Administer/System Settings',
[
'label' => E::ts('Check Alert Settings'),
'name' => 'checkalert_settings',
'url' => 'civicrm/admin/checkalert',
'permission' => 'administer CiviCRM',
'operator' => NULL,
'separator' => NULL,
]
);
_checkalert_civix_navigationMenu($menu);
}
/**
* Implements hook_civicrm_install().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
*/
function checkalert_civicrm_install(): void {
_checkalert_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
*/
function checkalert_civicrm_enable(): void {
_checkalert_civix_civicrm_enable();
}