3 require_once 'wci.civix.php';
6 * Implementation of hook_civicrm_config
8 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_config
10 function wci_civicrm_config(&$config) {
11 _wci_civix_civicrm_config($config);
15 * Implementation of hook_civicrm_xmlMenu
17 * @param $files array(string)
19 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_xmlMenu
21 function wci_civicrm_xmlMenu(&$files) {
22 _wci_civix_civicrm_xmlMenu($files);
26 * Implementation of hook_civicrm_install
28 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_install
30 function wci_civicrm_install() {
31 return _wci_civix_civicrm_install();
35 * Implementation of hook_civicrm_uninstall
37 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_uninstall
39 function wci_civicrm_uninstall() {
40 return _wci_civix_civicrm_uninstall();
44 * Implementation of hook_civicrm_enable
46 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_enable
48 function wci_civicrm_enable() {
49 return _wci_civix_civicrm_enable();
53 * Implementation of hook_civicrm_disable
55 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_disable
57 function wci_civicrm_disable() {
58 return _wci_civix_civicrm_disable();
62 * Implementation of hook_civicrm_upgrade
64 * @param $op string, the type of operation being performed; 'check' or 'enqueue'
65 * @param $queue CRM_Queue_Queue, (for 'enqueue') the modifiable list of pending up upgrade tasks
67 * @return mixed based on op. for 'check', returns array(boolean) (TRUE if upgrades are pending)
68 * for 'enqueue', returns void
70 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_upgrade
72 function wci_civicrm_upgrade($op, CRM_Queue_Queue
$queue = NULL) {
73 return _wci_civix_civicrm_upgrade($op, $queue);
77 * Implementation of hook_civicrm_managed
79 * Generate a list of entities to create/deactivate/delete when this module
80 * is installed, disabled, uninstalled.
82 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_managed
84 function wci_civicrm_managed(&$entities) {
85 return _wci_civix_civicrm_managed($entities);
89 * Implementation of hook_civicrm_caseTypes
91 * Generate a list of case-types
93 * Note: This hook only runs in CiviCRM 4.4+.
95 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_caseTypes
97 function wci_civicrm_caseTypes(&$caseTypes) {
98 _wci_civix_civicrm_caseTypes($caseTypes);
102 * Implementation of hook_civicrm_alterSettingsFolders
104 * @link http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_alterSettingsFolders
106 function wci_civicrm_alterSettingsFolders(&$metaDataFolders = NULL) {
107 _wci_civix_civicrm_alterSettingsFolders($metaDataFolders);
110 function wci_civicrm_navigationMenu( &$params ) {
112 $navId = CRM_Core_DAO
::singleValueQuery("SELECT max(id) FROM civicrm_navigation");
113 if (is_integer($navId)) {
116 // Find the Help menu
117 $helpID = CRM_Core_DAO
::getFieldValue('CRM_Core_DAO_Navigation', 'Help', 'id', 'name');
118 $params[$navId] = $params[$helpID];
119 // inserting WCI menu at the place of old help location
120 $params[$helpID] = array (
121 'attributes' => array (
122 'label' => ts('Widgets and Progress Bars'),
125 'permission' => 'access CiviReport,access CiviContribute',
133 'attributes' => array (
134 'label' => ts('New Widget'),
135 'name' => 'new_widget',
136 'url' => 'civicrm/wci/widget/add',
137 'permission' => 'access CiviReport,access CiviContribute',
140 'parentID' => $navId,
145 'attributes' => array (
146 'label' => ts('Manage Widget'),
147 'name' => 'manage_widget',
148 'url' => 'civicrm/wci/widget?reset=1',
149 'permission' => 'access CiviReport,access CiviContribute',
152 'parentID' => $navId,
157 'attributes' => array (
158 'label' => ts('New Progress Bar'),
159 'name' => 'new_progress_bar',
160 'url' => 'civicrm/wci/progress-bar/add',
161 'permission' => 'access CiviReport,access CiviContribute',
164 'parentID' => $navId,
169 'attributes' => array (
170 'label' => ts('Manage Progress Bar'),
171 'name' => 'manage_progress_bar',
172 'url' => 'civicrm/wci/progress-bar?reset=1',
173 'permission' => 'access CiviReport,access CiviContribute',
176 'parentID' => $navId,