diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index 9c657ae46..d3112fd97 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -342,13 +342,19 @@ class CRUDController extends AbstractController */ protected function buildQueryEntities(string $action, Request $request) { - return $this->getDoctrine()->getManager() + $query = $this->getDoctrine()->getManager() ->createQueryBuilder() ->select('e') ->from($this->getEntityClass(), 'e') ; + + $this->customizeQuery($action, $request, $query); + + return $query; } + protected function customizeQuery(string $action, Request $request, $query): void {} + /** * Query the entity. *