1 | <?php |
||
13 | class ReadOnlySubscriber implements EventSubscriber |
||
14 | { |
||
15 | /** |
||
16 | * @return array |
||
17 | */ |
||
18 | public function getSubscribedEvents() |
||
22 | |||
23 | /** |
||
24 | * @param LifecycleEventArgs $args |
||
25 | * @throws ReadOnlyEntityCantBePersistedException |
||
26 | */ |
||
27 | public function prePersist(LifecycleEventArgs $args) |
||
33 | |||
34 | /** |
||
35 | * @param PreFlushEventArgs $args |
||
36 | * @throws ReadOnlyEntityCantBeFlushedException |
||
37 | */ |
||
38 | public function preFlush(PreFlushEventArgs $args) |
||
52 | |||
53 | /** |
||
54 | * @param object $entity |
||
55 | * @return bool |
||
56 | */ |
||
57 | protected function isReadOnlyEntity($entity) |
||
61 | } |
||
62 |