Kaynağa Gözat

Refactoring actions

develop
Fab 3 yıl önce
ebeveyn
işleme
db826573de
1 değiştirilmiş dosya ile 7 ekleme ve 3 silme
  1. +7
    -3
      Controller/AbstractAdminController.php

+ 7
- 3
Controller/AbstractAdminController.php Dosyayı Görüntüle

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

Yükleniyor…
İptal
Kaydet