1 | <?php |
||
26 | class TenantSubscriber implements EventSubscriber |
||
27 | { |
||
28 | /** |
||
29 | * @var ContainerInterface |
||
30 | */ |
||
31 | protected $container; |
||
32 | |||
33 | /** |
||
34 | * @var TenantContextInterface |
||
35 | */ |
||
36 | protected $tenantContext; |
||
37 | |||
38 | /** |
||
39 | * Constructor. |
||
40 | * |
||
41 | * @param ContainerInterface $container |
||
42 | */ |
||
43 | public function __construct(ContainerInterface $container) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function getSubscribedEvents() |
||
57 | |||
58 | /** |
||
59 | * @param LifecycleEventArgs $args |
||
60 | */ |
||
61 | public function prePersist(LifecycleEventArgs $args) |
||
65 | |||
66 | /** |
||
67 | * @param LifecycleEventArgs $args |
||
68 | */ |
||
69 | protected function addTenant(LifecycleEventArgs $args) |
||
85 | } |
||
86 |