mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Delete overriding of generateTemplateParameters method
This method was requiring a person_id to be set, which was\ not the case here so it threw an error. Using the method\ already available in CRUDController works fine, seems to be\ no need to override it.
This commit is contained in:
parent
9a34064b23
commit
36f2275a56
@ -66,25 +66,6 @@ class EntityPersonCRUDController extends CRUDController
|
|||||||
return $qb;
|
return $qb;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws \Exception
|
|
||||||
*/
|
|
||||||
protected function generateTemplateParameter(string $action, $entity, Request $request, array $defaultTemplateParameters = []): array
|
|
||||||
{
|
|
||||||
$person = $this->getPerson($request);
|
|
||||||
|
|
||||||
if (null === $person) {
|
|
||||||
throw new \Exception('the `person_id` parameter is not set in the query. You should set it or override the current method to allow another behaviour: '.__METHOD__);
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::generateTemplateParameter(
|
|
||||||
$action,
|
|
||||||
$entity,
|
|
||||||
$request,
|
|
||||||
\array_merge(['person' => $person], $defaultTemplateParameters)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extract the person from the request.
|
* Extract the person from the request.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user