-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearchkitpivot.php
executable file
·64 lines (58 loc) · 2.06 KB
/
searchkitpivot.php
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
<?php
require_once 'searchkitpivot.civix.php';
// phpcs:disable
use CRM_Searchkitpivot_ExtensionUtil as E;
// phpcs:enable
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Implement hook_civicrm_container().
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
*/
function searchkitpivot_civicrm_container(ContainerBuilder $container) {
$container->addResource(new FileResource(__FILE__));
$container->setDefinition('bundle.pivottable',
new Definition('CRM_Core_Resources_Bundle', ['bndlpivottable', '_bndlpivottable_init_pivottable'])
)
->setFactory('CRM_Core_Resources_Common::createBasicBundle')
->setPublic(TRUE);
}
function _bndlpivottable_init_pivottable($bndlpivottable) {
// CRM_Core_Error::debug('Firing _bndlpivotable_init', null, true);
// CRM_Core_Error::debug('Loging bndlpivotable', $bndlpivottable, true);
// $bndlpivottable
// ->addScriptUrl('https://cdnjs.cloudflare.com/ajax/libs/pivottable/2.23.0/pivot.min.js');
// integrity="sha512-XgJh9jgd6gAHu9PcRBBAp0Hda8Tg87zi09Q2639t0tQpFFQhGpeCgaiEFji36Ozijjx9agZxB0w53edOFGCQ0g==" /
// crossorigin="anonymous" referrerpolicy="no-referrer"' )
// ->addStyleFile(E::LONG_NAME, 'css/pivottable.css')
// ->addVars('pivottable', [
// 'Title' => 'no',
// 'Total' => 'no',
// ]);
}
/**
* Implements hook_civicrm_config().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
*/
function searchkitpivot_civicrm_config(&$config): void {
_searchkitpivot_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
*/
function searchkitpivot_civicrm_install(): void {
_searchkitpivot_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
*/
function searchkitpivot_civicrm_enable(): void {
_searchkitpivot_civix_civicrm_enable();
}