Преглед изворни кода

corretif apres refactoring

develop
Charly пре 3 година
родитељ
комит
083ff7528b
5 измењених фајлова са 20 додато и 22 уклоњено
  1. +18
    -18
      Controller/AbstractAdminController.php
  2. +1
    -1
      Controller/Dashboard/DashboardAdminController.php
  3. +1
    -1
      Controller/Ticket/TicketAdminController.php
  4. +0
    -1
      EventSubscriber/SiteSettingEventSubscriber.php
  5. +0
    -1
      Model/User/UserModel.php

+ 18
- 18
Controller/AbstractAdminController.php Прегледај датотеку

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

+ 1
- 1
Controller/Dashboard/DashboardAdminController.php Прегледај датотеку

@@ -56,7 +56,7 @@ class DashboardAdminController extends AbstractDashboardController
// if you prefer to create the user menu from scratch, use: return UserMenu::new()->...
return parent::configureUserMenu($user)
// use the given $user object to get the user name
->setName($user->getName())
->setName($user->getFirstName())
// use this method if you don't want to display the name of the user
//->displayUserName(false)
->displayUserAvatar(false)

+ 1
- 1
Controller/Ticket/TicketAdminController.php Прегледај датотеку

@@ -53,7 +53,7 @@ class TicketAdminController extends AbstractAdminController

public function configureFields(string $pageName): iterable
{
$translatorAdmin = $this->get('translator_admin');
$translatorAdmin = $this->get(TranslatorAdmin::class);
return [
IntegerField::new('id')
->hideOnForm(),

+ 0
- 1
EventSubscriber/SiteSettingEventSubscriber.php Прегледај датотеку

@@ -93,7 +93,6 @@ class SiteSettingEventSubscriber implements EventSubscriberInterface
}
}


$this->em->flush();
}


+ 0
- 1
Model/User/UserModel.php Прегледај датотеку

@@ -90,7 +90,6 @@ abstract class UserModel implements EntityInterface, UserInterface, DevAliasInte
}



public function getEmail(): ?string
{
return $this->email;

Loading…
Откажи
Сачувај