mixin/case-xml - Remove unused boilerplate
[civicrm-core.git] / ext / greenwich / greenwich.php
1 <?php
2
3 require_once 'greenwich.civix.php';
4 // phpcs:disable
5 use CRM_Greenwich_ExtensionUtil as E;
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 */
13 function greenwich_civicrm_config(&$config) {
14 _greenwich_civix_civicrm_config($config);
15 }
16
17 ///**
18 // * Implements hook_civicrm_xmlMenu().
19 // *
20 // * @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_xmlMenu
21 // */
22 //function greenwich_civicrm_xmlMenu(&$files) {
23 // _greenwich_civix_civicrm_xmlMenu($files);
24 //}
25
26 /**
27 * Implements hook_civicrm_themes().
28 */
29 function greenwich_civicrm_themes(&$themes) {
30 $themes['greenwich'] = [
31 'ext' => 'civicrm',
32 'title' => 'Greenwich',
33 'help' => ts('CiviCRM 4.x look-and-feel'),
34 ];
35 }
36
37 /**
38 * Implements hook_civicrm_alterBundle().
39 */
40 function greenwich_civicrm_alterBundle(CRM_Core_Resources_Bundle $bundle) {
41 $theme = Civi::service('themes')->getActiveThemeKey();
42 switch ($theme . ':' . $bundle->name) {
43 case 'greenwich:bootstrap3':
44 $bundle->clear();
45 $bundle->addStyleFile('greenwich', 'dist/bootstrap3.css');
46 $bundle->addScriptFile('greenwich', 'extern/bootstrap3/assets/javascripts/bootstrap.min.js', [
47 'translate' => FALSE,
48 ]);
49 $bundle->addScriptFile('greenwich', 'js/noConflict.js', [
50 'translate' => FALSE,
51 ]);
52 break;
53 }
54 }