Merge pull request #21943 from mattwire/gccacheignore
[civicrm-core.git] / ext / greenwich / greenwich.php
CommitLineData
f61fdd6a
TO
1<?php
2
3require_once 'greenwich.civix.php';
4// phpcs:disable
5use 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 */
13function greenwich_civicrm_config(&$config) {
14 _greenwich_civix_civicrm_config($config);
15}
16
f61fdd6a 17/**
07c0c047 18 * Implements hook_civicrm_themes().
f61fdd6a
TO
19 */
20function greenwich_civicrm_themes(&$themes) {
07c0c047
TO
21 $themes['greenwich'] = [
22 'ext' => 'civicrm',
23 'title' => 'Greenwich',
24 'help' => ts('CiviCRM 4.x look-and-feel'),
25 ];
26}
27
28/**
29 * Implements hook_civicrm_alterBundle().
30 */
31function greenwich_civicrm_alterBundle(CRM_Core_Resources_Bundle $bundle) {
32 $theme = Civi::service('themes')->getActiveThemeKey();
33 switch ($theme . ':' . $bundle->name) {
34 case 'greenwich:bootstrap3':
35 $bundle->clear();
36 $bundle->addStyleFile('greenwich', 'dist/bootstrap3.css');
37 $bundle->addScriptFile('greenwich', 'extern/bootstrap3/assets/javascripts/bootstrap.min.js', [
38 'translate' => FALSE,
39 ]);
c99c68b1
CW
40 $bundle->addScriptFile('greenwich', 'js/noConflict.js', [
41 'translate' => FALSE,
42 ]);
07c0c047
TO
43 break;
44 }
f61fdd6a 45}