Quellcode durchsuchen

Refactoring actions

develop
Fab vor 3 Jahren
Ursprung
Commit
db826573de
1 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen
  1. +7
    -3
      Controller/AbstractAdminController.php

+ 7
- 3
Controller/AbstractAdminController.php Datei anzeigen

@@ -355,6 +355,9 @@ abstract class AbstractAdminController extends EaAbstractCrudController
$this->handleSortableEntityActions($actions);
$this->handleTreeEntityActions($actions);

/*$actions->reorder(Crud::PAGE_EDIT, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_CONTINUE, Action::DELETE]);
$actions->reorder(Crud::PAGE_NEW, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_ADD_ANOTHER]);*/

return $actions;
}

@@ -429,7 +432,6 @@ abstract class AbstractAdminController extends EaAbstractCrudController
{
$actions->add(Crud::PAGE_EDIT, Action::INDEX);
$actions->add(Crud::PAGE_EDIT, Action::DELETE);
$actions->reorder(Crud::PAGE_EDIT, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_CONTINUE]);


$this->actionUpdate(
@@ -468,13 +470,16 @@ abstract class AbstractAdminController extends EaAbstractCrudController
$this->actionUpdate(
$actions,
Crud::PAGE_EDIT,
Action::SAVE_AND_CONTINUE,
Action::DELETE,
[
'icon' => 'trash',
'class' => 'btn btn-outline-danger action-delete',
'label' => $this->get('translator_admin')->transAction('delete'),
]
);



}

public function buildDetailActions(Actions $actions): void
@@ -484,7 +489,6 @@ abstract class AbstractAdminController extends EaAbstractCrudController
public function buildNewActions(Actions $actions): void
{
$actions->add(Crud::PAGE_NEW, Action::INDEX);
$actions->reorder(Crud::PAGE_NEW, [Action::INDEX, Action::SAVE_AND_RETURN, Action::SAVE_AND_ADD_ANOTHER]);

$this->actionUpdate(
$actions,

Laden…
Abbrechen
Speichern