blob: 9b319dd35f4a15bc2ccd30c3f2099e7ed2418fec (
plain)
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
|
<?php
/**
*
* @package testing
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace foo\bar\event;
/**
* Event listener
*/
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class permission implements EventSubscriberInterface
{
static public function getSubscribedEvents()
{
return array(
'core.permissions' => 'add_permissions',
);
}
public function add_permissions($event)
{
$permissions = $event['permissions'];
$permissions['u_foo'] = array('lang' => 'ACL_U_FOOBAR', 'cat' => 'post');
$event['permissions'] = $permissions;
}
}
|