/
GroupRoleChangeType.php
43 lines (33 loc) · 1.08 KB
/
GroupRoleChangeType.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
<?php
namespace Concrete\Core\Notification\Type;
use Concrete\Core\Entity\Notification\GroupRoleChangeNotification;
use Concrete\Core\Notification\Alert\Filter\StandardFilter;
use Concrete\Core\Notification\Subject\SubjectInterface;
use Concrete\Core\Notification\Subscription\StandardSubscription;
class GroupRoleChangeType extends Type
{
public function createNotification(SubjectInterface $group)
{
return new GroupRoleChangeNotification($group);
}
protected function createSubscription()
{
$subscription = new StandardSubscription('group_role_change', t('Group role changes'));
return $subscription;
}
public function getSubscription(SubjectInterface $subject)
{
return $this->createSubscription();
}
public function getAvailableSubscriptions()
{
return array($this->createSubscription());
}
public function getAvailableFilters()
{
return [
new StandardFilter($this, 'group_role_change', t('Group role changes'),
'grouprolechangenotification')
];
}
}