mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
Fix crudconfig
This commit is contained in:
@@ -22,7 +22,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
{
|
||||
public function personalSituationEdit(Request $request, $id)
|
||||
public function personalSituationEdit(Request $request, $id): Response
|
||||
{
|
||||
return $this->formEditAction(
|
||||
'ps_situation_edit',
|
||||
@@ -72,7 +72,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
return $this->generateUrl($route, ['id' => $entity->getPerson()->getId()]);
|
||||
}
|
||||
|
||||
protected function checkACL($action, $entity)
|
||||
protected function checkACL($action, $entity): void
|
||||
{
|
||||
match ($action) {
|
||||
'ps_situation_edit', 'dispositifs_edit' => $this->denyAccessUnlessGranted(
|
||||
@@ -116,16 +116,8 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface
|
||||
{
|
||||
switch ($action) {
|
||||
case 'dispositifs_edit':
|
||||
$form = $this->createForm($formClass, $entity, \array_merge(
|
||||
$formOptions,
|
||||
['center' => $entity->getPerson()->getCenter()]
|
||||
));
|
||||
$this->customizeForm($action, $form);
|
||||
|
||||
return $form;
|
||||
|
||||
case 'ps_situation_edit':
|
||||
case 'dispositifs_edit':
|
||||
$form = $this->createForm($formClass, $entity, \array_merge(
|
||||
$formOptions,
|
||||
['center' => $entity->getPerson()->getCenter()]
|
||||
@@ -139,7 +131,7 @@ class CSPersonController extends OneToOneEntityPersonCRUDController
|
||||
}
|
||||
}
|
||||
|
||||
protected function generateLabelForButton($action, $formName, $form)
|
||||
protected function generateLabelForButton($action, $formName, $form): string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'ps_situation_edit':
|
||||
|
Reference in New Issue
Block a user