Explorar el Código

Merge branch 'develop' of https://forge.laclic.fr/Laclic/SovBundle into develop

develop
Guillaume hace 3 años
padre
commit
cb995e9503
Se han modificado 6 ficheros con 27 adiciones y 30 borrados
  1. +20
    -20
      Controller/AbstractAdminController.php
  2. +2
    -1
      Controller/Dashboard/DashboardAdminController.php
  3. +1
    -1
      Controller/Ticket/TicketAdminController.php
  4. +2
    -2
      EventSubscriber/SiteSettingEventSubscriber.php
  5. +0
    -1
      Model/User/UserModel.php
  6. +2
    -5
      Twig/StoreTwigExtension.php

+ 20
- 20
Controller/AbstractAdminController.php Ver fichero

@@ -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);
@@ -384,7 +384,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController
)
);

$filterManager = $this->get('filter_manager');
$filterManager = $this->get(FilterManager::class);

$this->filtersForm->handleRequest($searchDto->getRequest());
/*if (($this->filtersForm->isSubmitted() && $this->filtersForm->isValid())) {
@@ -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)
@@ -751,7 +751,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController
$controller->configureFields($autocompleteContext['originatingPage'])
)->getByProperty($autocompleteContext['propertyName']);

$filterManager = $this->get('filter_manager');
$filterManager = $this->get(FilterManager::class);

$filterManager->applyFilter($queryBuilder, $field, $context->getRequest()->query->get('q'));
if ($filterManager->isRelationField($field->getProperty())) {

+ 2
- 1
Controller/Dashboard/DashboardAdminController.php Ver fichero

@@ -15,6 +15,7 @@ use Symfony\Component\Routing\Annotation\Route;

class DashboardAdminController extends AbstractDashboardController
{

public function index(): Response
{
return $this->render('@LcSov/adminlte/dashboard.html.twig');
@@ -56,7 +57,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 Ver fichero

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

+ 2
- 2
EventSubscriber/SiteSettingEventSubscriber.php Ver fichero

@@ -81,7 +81,8 @@ class SiteSettingEventSubscriber implements EventSubscriberInterface

$this->em->persist($entitySetting);
} else {
if ($entitySetting->getValue() === null
$methodGetValue = 'get' . ucfirst($setting['field']);
if ($entitySetting->$methodGetValue() === null
&& isset($setting['default'])
&& $setting['default'] !== null) {
$methodSetValue = 'set' . ucfirst($setting['field']);
@@ -92,7 +93,6 @@ class SiteSettingEventSubscriber implements EventSubscriberInterface
}
}


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


+ 0
- 1
Model/User/UserModel.php Ver fichero

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



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

+ 2
- 5
Twig/StoreTwigExtension.php Ver fichero

@@ -35,11 +35,8 @@ class StoreTwigExtension extends AbstractExtension

public function getReminders($params)
{
return $this->reminderStore->get(array_merge(
[
'user' => $this->security->getUser()
], $params)
);
//TODO !!!!!!
return array();
}

}

Cargando…
Cancelar
Guardar