1 | <?php |
||
29 | class TenantableListener implements EventSubscriberInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var TenantContextInterface |
||
33 | */ |
||
34 | protected $tenantContext; |
||
35 | |||
36 | /** |
||
37 | * @var EntityManagerInterface |
||
38 | */ |
||
39 | protected $entityManager; |
||
40 | |||
41 | /** |
||
42 | * @var RegistryInterface |
||
43 | */ |
||
44 | protected $doctrine; |
||
45 | |||
46 | /** |
||
47 | * Construct. |
||
48 | */ |
||
49 | public function __construct(RegistryInterface $doctrine, TenantContextInterface $tenantContext) |
||
54 | |||
55 | /** |
||
56 | * Enables tenantable filter on kernel.request. |
||
57 | */ |
||
58 | public function enable() |
||
70 | |||
71 | /** |
||
72 | * Disabled tenantable filter. |
||
73 | */ |
||
74 | public function disable() |
||
82 | |||
83 | /** |
||
84 | * {@inheritdoc} |
||
85 | */ |
||
86 | public static function getSubscribedEvents() |
||
94 | |||
95 | private function lazyLoad() |
||
101 | } |
||
102 |