-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteuimport.php
52 lines (43 loc) · 1.55 KB
/
teuimport.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
<?php
require_once 'teuimport.civix.php';
use CRM_Teuimport_ExtensionUtil as E;
use \Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Implements hook_civicrm_config().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_config/
*/
function teuimport_civicrm_config(&$config): void {
_teuimport_civix_civicrm_config($config);
}
/**
* Implements hook_civicrm_install().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_install
*/
function teuimport_civicrm_install(): void {
_teuimport_civix_civicrm_install();
}
/**
* Implements hook_civicrm_enable().
*
* @link https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_enable
*/
function teuimport_civicrm_enable(): void {
_teuimport_civix_civicrm_enable();
}
function teuimport_civicrm_container(ContainerBuilder $container) {
// Define our local fluent import class
$container->setParameter('fluent_import_class', \Civi\TEULocalFluentImport::class);
}
// function teuimport_civicrm_container($container) {
// $container
// ->findDefinition('dispatcher')
// ->addMethodCall('addListener', ['civi.fluentimport.register', 'register_our_global_fluentimport_stuff']);
// }
// function register_our_global_fluentimport_stuff($event) {
// \Civi\FluentImport\Store::registerGlobalMethod('getContactWithDedupe', function (FluentImport $i) use ($petition) {
// $data = [ 'location' => '', 'activity_date_time' => $i->getCleanValue('activity_date_time') ];
// $petition->recordConsent($i->getContextValue('contactID'), $data, 62); // xxx
// });
// }