|
|
@@ -183,7 +183,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
$entityClass = $this->getEntityFqcn(); |
|
|
|
$paramListMaxResults = 'listMaxResults'; |
|
|
|
$paramSessionListMaxResults = $entityClass.'-'.$paramListMaxResults; |
|
|
|
$requestListMaxResults = $this->get('request')->getCurrentRequest()->get($paramListMaxResults); |
|
|
|
$requestListMaxResults = $this->get(RequestStack::class)->getCurrentRequest()->get($paramListMaxResults); |
|
|
|
|
|
|
|
if ($requestListMaxResults) { |
|
|
|
$this->get('session')->set($paramSessionListMaxResults, $requestListMaxResults); |
|
|
@@ -466,11 +466,11 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
{ |
|
|
|
$duplicateAction = Action::new( |
|
|
|
'duplicate', |
|
|
|
$this->get('translator_admin')->transAction('duplicate'), |
|
|
|
$this->get(TranslatorAdmin::class)->transAction('duplicate'), |
|
|
|
'fa fa-fw fa-copy' |
|
|
|
) |
|
|
|
->linkToCrudAction('duplicate') |
|
|
|
->setLabel($this->get('translator_admin')->transAction('duplicate')) |
|
|
|
->setLabel($this->get(TranslatorAdmin::class)->transAction('duplicate')) |
|
|
|
->setCssClass('in-dropdown text-info action-confirm'); |
|
|
|
|
|
|
|
return $duplicateAction; |
|
|
@@ -486,7 +486,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
Action::NEW, |
|
|
|
[ |
|
|
|
'icon' => 'plus', |
|
|
|
'label' => $this->get('translator_admin')->transAction('create'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('create'), |
|
|
|
'add_class' => 'btn-sm', |
|
|
|
] |
|
|
|
); |
|
|
@@ -501,7 +501,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
'label' => false, |
|
|
|
'html_attributes' => array( |
|
|
|
'data-toggle' => 'tooltip', |
|
|
|
'title' => $this->get('translator_admin')->transAction('edit'), |
|
|
|
'title' => $this->get(TranslatorAdmin::class)->transAction('edit'), |
|
|
|
), |
|
|
|
] |
|
|
|
); |
|
|
@@ -516,7 +516,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
'label' => false, |
|
|
|
'html_attributes' => array( |
|
|
|
'data-toggle' => 'tooltip', |
|
|
|
'title' => $this->get('translator_admin')->transAction('detail'), |
|
|
|
'title' => $this->get(TranslatorAdmin::class)->transAction('detail'), |
|
|
|
), |
|
|
|
] |
|
|
|
); |
|
|
@@ -528,7 +528,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'icon' => 'trash', |
|
|
|
'dropdown' => true, |
|
|
|
'label' => $this->get('translator_admin')->transAction('delete'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('delete'), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
@@ -539,7 +539,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'class' => 'btn btn-sm btn-danger', |
|
|
|
'icon' => 'trash', |
|
|
|
'label' => $this->get('translator_admin')->transAction('delete'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('delete'), |
|
|
|
] |
|
|
|
); |
|
|
|
} |
|
|
@@ -558,7 +558,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'add_class' => 'float-right', |
|
|
|
'icon' => 'check', |
|
|
|
'label' => $this->get('translator_admin')->transAction('save_and_return'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('save_and_return'), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
@@ -569,7 +569,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'icon' => 'chevron-left', |
|
|
|
'class' => 'btn btn-link', |
|
|
|
'label' => $this->get('translator_admin')->transAction('back_index'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('back_index'), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
@@ -580,7 +580,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
Action::SAVE_AND_CONTINUE, |
|
|
|
[ |
|
|
|
'class' => 'btn btn-info float-right', |
|
|
|
'label' => $this->get('translator_admin')->transAction('save_and_continue'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('save_and_continue'), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
@@ -591,7 +591,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'icon' => 'trash', |
|
|
|
'class' => 'btn btn-outline-danger action-delete', |
|
|
|
'label' => $this->get('translator_admin')->transAction('delete'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('delete'), |
|
|
|
] |
|
|
|
); |
|
|
|
} |
|
|
@@ -611,7 +611,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'add_class' => 'float-right', |
|
|
|
'icon' => 'check', |
|
|
|
'label' => $this->get('translator_admin')->transAction('save_and_return'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('save_and_return'), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
@@ -622,7 +622,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
[ |
|
|
|
'icon' => 'chevron-left', |
|
|
|
'class' => 'btn btn-link', |
|
|
|
'label' => $this->get('translator_admin')->transAction('back_index'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('back_index'), |
|
|
|
] |
|
|
|
); |
|
|
|
|
|
|
@@ -632,7 +632,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
Action::SAVE_AND_ADD_ANOTHER, |
|
|
|
[ |
|
|
|
'class' => 'btn btn-info float-right', |
|
|
|
'label' => $this->get('translator_admin')->transAction('save_and_add_another'), |
|
|
|
'label' => $this->get(TranslatorAdmin::class)->transAction('save_and_add_another'), |
|
|
|
] |
|
|
|
); |
|
|
|
} |
|
|
@@ -655,7 +655,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
public function handleSortableEntityActions(Actions $actions): void |
|
|
|
{ |
|
|
|
if ($this->isInstanceOf(SortableInterface::class)) { |
|
|
|
$sortAction = Action::new('sort', $this->get('translator_admin')->transAction('sort'), 'fa fa-sort') |
|
|
|
$sortAction = Action::new('sort', $this->get(TranslatorAdmin::class)->transAction('sort'), 'fa fa-sort') |
|
|
|
->linkToCrudAction('sort') |
|
|
|
->setCssClass('btn btn-sm btn-success') |
|
|
|
->createAsGlobalAction(); |
|
|
@@ -670,7 +670,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
if ($this->isInstanceOf(TreeInterface::class)) { |
|
|
|
$indexChildAction = Action::new( |
|
|
|
'index_children', |
|
|
|
$this->get('translator_admin')->transAction('index_children'), |
|
|
|
$this->get(TranslatorAdmin::class)->transAction('index_children'), |
|
|
|
'fa fa-list' |
|
|
|
) |
|
|
|
->linkToCrudAction(Action::INDEX) |
|
|
@@ -681,7 +681,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController |
|
|
|
|
|
|
|
$backParentAction = Action::new( |
|
|
|
'index_parent', |
|
|
|
$this->get('translator_admin')->transAction('index_parent'), |
|
|
|
$this->get(TranslatorAdmin::class)->transAction('index_parent'), |
|
|
|
'fa fa-chevron-left' |
|
|
|
) |
|
|
|
->linkToCrudAction(Action::INDEX) |