-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpowermap.php
More file actions
75 lines (67 loc) · 1.92 KB
/
powermap.php
File metadata and controls
75 lines (67 loc) · 1.92 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
73
74
75
<?php
require_once 'powermap.civix.php';
use CRM_Powermap_ExtensionUtil as E;
/**
* Implements hook_civicrm_config().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
*/
function powermap_civicrm_config(&$config) {
_powermap_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
*/
function powermap_civicrm_install() {
_powermap_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
*/
function powermap_civicrm_enable() {
_powermap_civix_civicrm_enable();
}
/**
* Implements hook_civicrm_navigationMenu().
*/
function powermap_civicrm_navigationMenu(&$menu) {
_powermap_civix_insert_navigation_menu($menu, 'Contacts', [
'label' => E::ts('PowerMap'),
'name' => 'powermap',
'url' => 'civicrm/powermap',
'permission' => 'access CiviCRM',
'operator' => 'OR',
'separator' => 0,
'icon' => 'crm-i fa-sitemap',
]);
_powermap_civix_navigationMenu($menu);
}
/**
* Implements hook_civicrm_permission().
*/
function powermap_civicrm_permission(&$permissions) {
$permissions['access powermap'] = [
'label' => E::ts('PowerMap: Access PowerMap'),
'description' => E::ts('Grants access to view and use PowerMap visualization'),
];
$permissions['edit powermap'] = [
'label' => E::ts('PowerMap: Edit PowerMap'),
'description' => E::ts('Grants permission to create and modify power map data'),
];
}
/**
* Implements hook_civicrm_angularModules().
*/
function powermap_civicrm_angularModules(&$angularModules) {
$angularModules['crmPowermap'] = [
'ext' => 'com.skvare.powermap',
'js' => ['ang/crmPowermap.js', 'ang/crmPowermap/*.js'],
'css' => ['ang/crmPowermap.css'],
'partials' => ['ang/crmPowermap'],
'requires' => ['crmUi', 'crmUtil', 'ngRoute'],
];
}