-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMoreGreetingsSubscriber.php
42 lines (37 loc) · 1.52 KB
/
MoreGreetingsSubscriber.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
<?php
/*-------------------------------------------------------+
| SYSTOPIA - MORE GREETINGS EXTENSION |
| Copyright (C) 2019 SYSTOPIA |
| Author: B. Endres ([email protected]) |
| http://www.systopia.de/ |
+--------------------------------------------------------+
| This program is released as free software under the |
| Affero GPL license. You can redistribute it and/or |
| modify it under the terms of this license which you |
| can read by viewing the included agpl.txt or online |
| at www.gnu.org/licenses/agpl.html. Removal of this |
| copyright header is strictly prohibited without |
| written permission from the original author(s). |
+--------------------------------------------------------*/
use Civi\API\Events;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use \Civi\Core\Event\GenericHookEvent;
/**
* Subscribe to XDedupe events, so we can register our resolver
*/
class CRM_Xdedupe_Resolver_MoreGreetingsSubscriber implements EventSubscriberInterface {
/**
* Subscribe to the list events, so we can plug the built-in ones
*/
public static function getSubscribedEvents(): array {
return [
'civi.xdedupe.resolvers' => ['addBuiltinResolvers', Events::W_MIDDLE],
];
}
/**
* Return the list of built-in resolvers
*/
public function addBuiltinResolvers(GenericHookEvent $xdedupe_list) {
$xdedupe_list->list[] = 'CRM_Xdedupe_Resolver_MoreGreetings';
}
}