- <?php
-
- namespace Lc\AdminBundle\Event\EntityManager;
-
- use Lc\AdminBundle\IModel\EntityInterface;
- use Symfony\Contracts\EventDispatcher\Event;
-
- /**
- * class EntityEvent.
- *
- * @author Simon Vieille <simon@deblan.fr>
- */
- class EntityManagerEvent extends Event
- {
- const CREATE_EVENT = 'entity_manager_event.create';
- const UPDATE_EVENT = 'entity_manager_event.update';
- const DELETE_EVENT = 'entity_manager_event.delete';
-
- protected EntityInterface $entity;
-
- public function __construct(EntityInterface $entity)
- {
- $this->entity = $entity;
- }
-
- public function getEntity(): EntityInterface
- {
- return $this->entity;
- }
- }
|