mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-14 13:21:25 +00:00
Inject ManagerRegistry directly instead of getting from container
This commit is contained in:
@@ -80,8 +80,8 @@ class ApiController extends AbstractCRUDController
|
||||
return $response;
|
||||
}
|
||||
|
||||
$this->getManagerRegistry()->getManager()->remove($entity);
|
||||
$this->getManagerRegistry()->getManager()->flush();
|
||||
$this->doctrine->getManager()->remove($entity);
|
||||
$this->doctrine->getManager()->flush();
|
||||
|
||||
$response = $this->onAfterFlush($action, $request, $_format, $entity, $errors);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user