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:
Julie Lenaerts 2024-06-25 17:22:48 +02:00
parent 9a34064b23
commit 36f2275a56

View File

@ -66,25 +66,6 @@ class EntityPersonCRUDController extends CRUDController
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.
*