Selaa lähdekoodia

Refactoring actions

develop
Fab 3 vuotta sitten
vanhempi
commit
db826573de
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. +7
    -3
      Controller/AbstractAdminController.php

+ 7
- 3
Controller/AbstractAdminController.php Näytä tiedosto

@@ -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,

Loading…
Peruuta
Tallenna