1 | <?php |
||
28 | class TenantableListener implements EventSubscriberInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var TenantContextInterface |
||
32 | */ |
||
33 | protected $tenantContext; |
||
34 | |||
35 | /** |
||
36 | * @var EntityManagerInterface |
||
37 | */ |
||
38 | protected $entityManager; |
||
39 | |||
40 | /** |
||
41 | * Construct. |
||
42 | * |
||
43 | * @param EntityManagerInterface $entityManager |
||
44 | * @param TenantContextInterface $tenantContext |
||
45 | */ |
||
46 | public function __construct(EntityManagerInterface $entityManager, TenantContextInterface $tenantContext) |
||
51 | |||
52 | /** |
||
53 | * Enables tenantable filter on kernel.request. |
||
54 | */ |
||
55 | public function enable() |
||
66 | |||
67 | /** |
||
68 | * Disabled tenantable filter. |
||
69 | */ |
||
70 | public function disable() |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | public static function getSubscribedEvents() |
||
90 | } |
||
91 |