|
|
|
|
|
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\AfterEntityUpdatedEvent; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\AfterEntityUpdatedEvent; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeCrudActionEvent; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityDeletedEvent; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityDeletedEvent; |
|
|
|
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\BeforeEntityUpdatedEvent; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Exception\ForbiddenActionException; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Exception\ForbiddenActionException; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Exception\InsufficientEntityPermissionException; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Exception\InsufficientEntityPermissionException; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Factory\ControllerFactory; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Factory\ControllerFactory; |
|
|
|
|
|
|
|
|
throw new InsufficientEntityPermissionException($context); |
|
|
throw new InsufficientEntityPermissionException($context); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$event = new BeforeEntityDeletedEvent($entityInstance); |
|
|
|
|
|
|
|
|
$event = new BeforeEntityUpdatedEvent($entityInstance); |
|
|
$this->get('event_dispatcher')->dispatch($event); |
|
|
$this->get('event_dispatcher')->dispatch($event); |
|
|
$entityInstance = $event->getEntityInstance(); |
|
|
$entityInstance = $event->getEntityInstance(); |
|
|
|
|
|
|
|
|
$entityInstance->setPosition($elm['position']); |
|
|
$entityInstance->setPosition($elm['position']); |
|
|
$this->updateEntity($entityManager, $entityInstance); |
|
|
$this->updateEntity($entityManager, $entityInstance); |
|
|
|
|
|
|
|
|
$this->get('event_dispatcher')->dispatch(new AfterEntityUpdatedEvent($entityInstance)); |
|
|
|
|
|
|
|
|
// @TODO : ce dispatch déclenche UpdateProductfamilyAfterFlushEventSubscriber dans Caracole et on tombe sur une erreur "Maximum execution time" |
|
|
|
|
|
//$this->get('event_dispatcher')->dispatch(new AfterEntityUpdatedEvent($entityInstance)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$url = $this->get(AdminUrlGenerator::class) |
|
|
$url = $this->get(AdminUrlGenerator::class) |