You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 line
663B

  1. <?php
  2. namespace Lc\SovBundle\Event\EntityManager;
  3. use Lc\SovBundle\Doctrine\EntityInterface;
  4. use Symfony\Contracts\EventDispatcher\Event;
  5. /**
  6. * class EntityEvent.
  7. *
  8. * @author Simon Vieille <simon@deblan.fr>
  9. */
  10. class EntityManagerEvent extends Event
  11. {
  12. const CREATE_EVENT = 'entity_manager_event.create';
  13. const UPDATE_EVENT = 'entity_manager_event.update';
  14. const DELETE_EVENT = 'entity_manager_event.delete';
  15. protected EntityInterface $entity;
  16. public function __construct(EntityInterface $entity)
  17. {
  18. $this->entity = $entity;
  19. }
  20. public function getEntity(): EntityInterface
  21. {
  22. return $this->entity;
  23. }
  24. }