$assets->addWebpackEncoreEntry('adminlte-sort'); | $assets->addWebpackEncoreEntry('adminlte-sort'); | ||||
$assets->addWebpackEncoreEntry('adminlte-field-collection'); | $assets->addWebpackEncoreEntry('adminlte-field-collection'); | ||||
$assets->addWebpackEncoreEntry('adminlte-field-filemanager'); | $assets->addWebpackEncoreEntry('adminlte-field-filemanager'); | ||||
$assets->addWebpackEncoreEntry('adminlte-reminder'); | |||||
return $assets; | return $assets; | ||||
} | } |
namespace Lc\SovBundle\Controller\Reminder; | namespace Lc\SovBundle\Controller\Reminder; | ||||
use Lc\SovBundle\Controller\AbstractAdminController; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Lc\SovBundle\Factory\Reminder\ReminderFactoryInterface; | |||||
use Lc\SovBundle\Form\Reminder\ReminderAdminFormType; | |||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |||||
use Symfony\Component\Form\FormFactoryInterface; | |||||
use Symfony\Component\HttpFoundation\Request; | |||||
use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | |||||
abstract class ReminderAdminController extends AbstractAdminController | |||||
class ReminderAdminController extends AbstractController | |||||
{ | { | ||||
protected $entityManager; | |||||
protected $reminderFactory; | |||||
protected $formFactory; | |||||
protected $urlGenerator; | |||||
public function __construct( | |||||
EntityManagerInterface $entityManager, | |||||
ReminderFactoryInterface $reminderFactory, | |||||
FormFactoryInterface $formFactory, | |||||
UrlGeneratorInterface $urlGenerator | |||||
) { | |||||
$this->entityManager = $entityManager; | |||||
$this->reminderFactory = $reminderFactory; | |||||
$this->formFactory = $formFactory; | |||||
$this->urlGenerator = $urlGenerator; | |||||
} | |||||
public function renderModal(Request $request): Response | |||||
{ | |||||
$reminder = $this->reminderFactory->create( | |||||
[ | |||||
'crudAction' => $request->get('crudAction'), | |||||
'crudControllerFqcn' => $request->get('crudControllerFqcn'), | |||||
'entityId' => $request->get('entityId'), | |||||
] | |||||
); | |||||
$form = $this->formFactory->create( | |||||
ReminderAdminFormType::class, | |||||
$reminder, | |||||
[ | |||||
'action' => $this->urlGenerator->generate('sov_admin_reminder_new') | |||||
] | |||||
); | |||||
return $this->render( | |||||
'@LcSov/admin/reminder/form_modal.html.twig', | |||||
[ | |||||
'form_reminder' => $form->createView() | |||||
] | |||||
); | |||||
} | |||||
public function new(Request $request) | |||||
{ | |||||
$reminder = $this->reminderFactory->create(); | |||||
$form = $this->formFactory->create(ReminderAdminFormType::class, $reminder); | |||||
$form->handleRequest($request); | |||||
if ($form->isSubmitted() && $form->isValid()) { | |||||
$reminder = $form->getData(); | |||||
$this->entityManager->persist($reminder); | |||||
$this->entityManager->flush(); | |||||
$this->addFlash('success', 'Le pense-bête a bien été ajouté'); | |||||
} | |||||
return $this->redirect($request->headers->get('referer')); | |||||
} | |||||
/* | |||||
public function renderTemplate($actionName, $templatePath, array $parameters = []) | public function renderTemplate($actionName, $templatePath, array $parameters = []) | ||||
{ | { | ||||
if ($this->request->isXmlHttpRequest() && ($actionName == 'new' || $actionName == 'edit')) { | if ($this->request->isXmlHttpRequest() && ($actionName == 'new' || $actionName == 'edit')) { | ||||
$this->em->persist($reminder); | $this->em->persist($reminder); | ||||
$this->em->flush(); | $this->em->flush(); | ||||
return $this->redirectToReferrer(); | return $this->redirectToReferrer(); | ||||
} | |||||
}*/ | |||||
} | } |
namespace Lc\SovBundle\Controller\User; | namespace Lc\SovBundle\Controller\User; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Provider\AdminContextProvider; | |||||
use Lc\SovBundle\Doctrine\EntityManager; | use Lc\SovBundle\Doctrine\EntityManager; | ||||
use Lc\SovBundle\Form\User\ChangePasswordFormType; | use Lc\SovBundle\Form\User\ChangePasswordFormType; | ||||
use Lc\SovBundle\Form\User\ProfileFormType; | use Lc\SovBundle\Form\User\ProfileFormType; | ||||
use Lc\SovBundle\Form\User\UserMerchantFormType; | |||||
use Lc\SovBundle\Model\User\User; | use Lc\SovBundle\Model\User\User; | ||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||||
use Symfony\Component\HttpFoundation\Request; | use Symfony\Component\HttpFoundation\Request; | ||||
use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface; | |||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; | use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; | ||||
use Symfony\Component\Translation\TranslatableMessage; | use Symfony\Component\Translation\TranslatableMessage; | ||||
); | ); | ||||
} | } | ||||
public function changePassword(Request $request, UserPasswordHasherInterface $passwordEncoder): Response | |||||
public function changePassword(Request $request, UserPasswordEncoderInterface $passwordEncoder): Response | |||||
{ | { | ||||
$user = $this->getUser(); | $user = $this->getUser(); | ||||
$form = $this->createForm(ChangePasswordFormType::class, $user); | $form = $this->createForm(ChangePasswordFormType::class, $user); | ||||
$plainPassword = $form->get('plain_password')->getData(); | $plainPassword = $form->get('plain_password')->getData(); | ||||
$user->setPassword($passwordEncoder->hashPassword($user, $plainPassword)); | |||||
$user->setPassword($passwordEncoder->encodePassword($user, $plainPassword)); | |||||
$this->em->update($user); | $this->em->update($user); | ||||
$this->em->flush(); | $this->em->flush(); |
<?php | |||||
namespace Lc\SovBundle\Factory\Reminder; | |||||
use Lc\SovBundle\Factory\AbstractFactory; | |||||
use Lc\SovBundle\Model\Reminder\ReminderInterface; | |||||
class ReminderFactory extends AbstractFactory implements ReminderFactoryInterface | |||||
{ | |||||
public function getEntityClass() | |||||
{ | |||||
return ReminderInterface::class; | |||||
} | |||||
} |
<?php | |||||
namespace Lc\SovBundle\Factory\Reminder; | |||||
interface ReminderFactoryInterface | |||||
{ | |||||
} |
<?php | |||||
namespace Lc\SovBundle\Form\Reminder; | |||||
use Lc\SovBundle\Model\Reminder\ReminderInterface; | |||||
use Lc\SovBundle\Model\User\UserInterface; | |||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | |||||
use Symfony\Component\Form\Extension\Core\Type\DateType; | |||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextareaType; | |||||
use Symfony\Component\Form\Extension\Core\Type\TextType; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Symfony\Component\Form\AbstractType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | |||||
use Symfony\Component\OptionsResolver\OptionsResolver; | |||||
class ReminderAdminFormType extends AbstractType | |||||
{ | |||||
protected $entityManager; | |||||
public function __construct(EntityManagerInterface $entityManager) | |||||
{ | |||||
$this->entityManager = $entityManager; | |||||
} | |||||
public function buildForm(FormBuilderInterface $builder, array $options) | |||||
{ | |||||
$userClass = $this->entityManager->getEntityName(UserInterface::class); | |||||
$userRepo = $this->entityManager->getRepository(UserInterface::class); | |||||
$builder | |||||
->add('title', TextType::class, ['label' => 'Titre']) | |||||
->add( | |||||
'description', | |||||
TextareaType::class, | |||||
array( | |||||
'required' => false | |||||
) | |||||
) | |||||
->add( | |||||
'crudAction', | |||||
HiddenType::class, | |||||
array( | |||||
'required' => false | |||||
) | |||||
) | |||||
->add( | |||||
'crudControllerFqcn', | |||||
HiddenType::class, | |||||
array( | |||||
'required' => false | |||||
) | |||||
) | |||||
->add( | |||||
'entityId', | |||||
HiddenType::class, | |||||
array( | |||||
'required' => false | |||||
) | |||||
) | |||||
->add( | |||||
'users', | |||||
EntityType::class, | |||||
array( | |||||
'class' => $userClass, | |||||
'choices' => $userRepo->findByRole('ROLE_ADMIN'), | |||||
'required' => false, | |||||
'multiple' => true, | |||||
'expanded' => false | |||||
) | |||||
) | |||||
->add( | |||||
'dateReminder', | |||||
DateType::class, | |||||
array( | |||||
'required' => false, | |||||
'widget' => 'single_text', | |||||
) | |||||
); | |||||
} | |||||
public function configureOptions(OptionsResolver $resolver) | |||||
{ | |||||
$resolver->setDefaults( | |||||
[ | |||||
'data_class' => $this->entityManager->getEntityName(ReminderInterface::class) | |||||
] | |||||
); | |||||
} | |||||
} |
/** | /** | ||||
* temporary fields (do not delete) | * temporary fields (do not delete) | ||||
*/ | */ | ||||
public $relatedPage; | |||||
protected $relatedPage; | |||||
/** | /** | ||||
* @ORM\Column(type="string", length=255) | * @ORM\Column(type="string", length=255) | ||||
protected $description; | protected $description; | ||||
/** | /** | ||||
* @ORM\Column(type="string", length=255, nullable=true) | |||||
* @ORM\Column(type="string", length=64, nullable=true) | |||||
*/ | */ | ||||
protected $entityName; | |||||
protected $crudAction; | |||||
/** | /** | ||||
* @ORM\Column(type="integer", nullable=true) | |||||
* @ORM\Column(type="string", length=255, nullable=true) | |||||
*/ | */ | ||||
protected $entityId; | |||||
protected $crudControllerFqcn; | |||||
/** | /** | ||||
* @ORM\Column(type="string", length=255, nullable=true) | |||||
* @ORM\Column(type="integer", nullable=true) | |||||
*/ | */ | ||||
protected $entityAction; | |||||
protected $entityId; | |||||
/** | /** | ||||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface") | * @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface") | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getEntityName(): ?string | |||||
public function getCrudAction(): ?string | |||||
{ | { | ||||
return $this->entityName; | |||||
return $this->crudAction; | |||||
} | } | ||||
public function setEntityName(?string $entityName): self | |||||
public function setCrudAction(?string $crudAction): self | |||||
{ | { | ||||
$this->entityName = $entityName; | |||||
$this->crudAction = $crudAction; | |||||
return $this; | return $this; | ||||
} | } | ||||
public function getEntityAction(): ?string | |||||
public function getCrudControllerFqcn(): ?string | |||||
{ | { | ||||
return $this->entityAction; | |||||
return $this->crudControllerFqcn; | |||||
} | } | ||||
public function setEntityAction(?string $entityAction): self | |||||
public function setCrudControllerFqcn(?string $crudControllerFqcn): self | |||||
{ | { | ||||
$this->entityAction = $entityAction; | |||||
$this->crudControllerFqcn = $crudControllerFqcn; | |||||
return $this; | return $this; | ||||
} | } |
@import "adminlte-css"; | @import "adminlte-css"; | ||||
@import "fontawesome-css"; | @import "fontawesome-css"; | ||||
@import 'scss/common'; | |||||
@import 'scss/form/checkboxradio'; | @import 'scss/form/checkboxradio'; | ||||
@import 'scss/form/footer'; | @import 'scss/form/footer'; | ||||
@import 'scss/card'; | @import 'scss/card'; |
nav.main-header { | |||||
ul.navbar-nav { | |||||
li.nav-item-user-menu { | |||||
.dropdown-menu { | |||||
position: absolute ; | |||||
z-index: 1000 ; | |||||
} | |||||
} | |||||
li.nav-item { | |||||
margin-left: 10px; | |||||
.btn { | |||||
margin-top: 7px; | |||||
} | |||||
} | |||||
} | |||||
} |
import './reminder.js' | |||||
import './reminder.scss' |
$(document).ready(function() { | |||||
initReminder() ; | |||||
}) ; | |||||
function initReminder() { | |||||
var selectorModal = '#modal-reminder' ; | |||||
$('.btn-reminder').click(function() { | |||||
$.post($(this).attr('href'), { | |||||
crudAction: $(this).data('crud-action'), | |||||
crudControllerFqcn: $(this).data('crud-controller-fqcn'), | |||||
entityId: $(this).data('entity-id'), | |||||
}, function(html) { | |||||
$(selectorModal).remove() ; | |||||
$('body').append(html) ; | |||||
$(selectorModal).modal('show') ; | |||||
}); | |||||
return false ; | |||||
}) ; | |||||
} |
path: /admin/ticket/create | path: /admin/ticket/create | ||||
controller: Lc\SovBundle\Controller\Ticket\TicketAdminController::create | controller: Lc\SovBundle\Controller\Ticket\TicketAdminController::create | ||||
sov_admin_reminder_render_modal: | |||||
path: /admin/reminder/modal | |||||
controller: Lc\SovBundle\Controller\Reminder\ReminderAdminController::renderModal | |||||
sov_admin_reminder_new: | |||||
path: /admin/reminder/new | |||||
controller: Lc\SovBundle\Controller\Reminder\ReminderAdminController::new |
label_plurial: Bulletins d'informations | label_plurial: Bulletins d'informations | ||||
fields: | fields: | ||||
isMain: Principale | isMain: Principale | ||||
Reminder: | |||||
fields: | |||||
users: Utilisateurs | |||||
dateReminder: Date limite | |||||
Ticket: | Ticket: | ||||
label: Ticket | label: Ticket | ||||
label_plurial: Tickets | label_plurial: Tickets |
{% embed '@LcSov/adminlte/embed/modal.twig' %} | |||||
{% form_theme form_reminder '@LcSov/adminlte/crud/form_theme.html.twig' %} | |||||
{% block id %}modal-reminder{% endblock %} | |||||
{% block title %}Ajouter un pense-bête{% endblock %} | |||||
{% block form_start %} | |||||
{{ form_start(form_reminder) }} | |||||
{% endblock %} | |||||
{% block body %} | |||||
{{ form(form_reminder) }} | |||||
{% endblock %} | |||||
{% block footer %} | |||||
<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button> | |||||
<input type="submit" class="btn btn-primary btn-save" value="Ajouter" /> | |||||
{% endblock %} | |||||
{% block form_end %} | |||||
{{ form_end(form_reminder) }} | |||||
{% endblock %} | |||||
{% endembed %} |
</ul> | </ul> | ||||
<ul class="navbar-nav ml-auto"> | <ul class="navbar-nav ml-auto"> | ||||
<li class="nav-item"> | |||||
<li class="nav-item nav-item-user-menu"> | |||||
{% block user_menu %} | {% block user_menu %} | ||||
<div class="btn-group"> | <div class="btn-group"> | ||||
<button class="btn btn-block dropdown-toggle" data-toggle="dropdown" | |||||
<button class="btn btn-sm btn-default btn-block dropdown-toggle" data-toggle="dropdown" | |||||
data-placement="bottom"> | data-placement="bottom"> | ||||
<i class="fa fa-user-alt"></i> | <i class="fa fa-user-alt"></i> | ||||
<span class="user-name">{{ ea.user is null ? 'user.anonymous'|trans(domain = 'EasyAdminBundle') : ea.userMenu.name }}</span> | <span class="user-name">{{ ea.user is null ? 'user.anonymous'|trans(domain = 'EasyAdminBundle') : ea.userMenu.name }}</span> | ||||
{# <br /><small> | |||||
{% if is_granted('ROLE_SUPER_ADMIN') %} | |||||
<span class="mt-1 small text-muted">Superadmin</span> | |||||
{% elseif is_granted('ROLE_ADMIN') %} | |||||
<span class="mt-1 small text-muted">Admin</span> | |||||
{% else %} | |||||
<span class="mt-1 small text-muted">NC</span> | |||||
{% endif %} | |||||
</small> #} | |||||
</button> | </button> | ||||
{% if ea.userMenu.items|length > 0 %} | {% if ea.userMenu.items|length > 0 %} | ||||
<div class="dropdown-menu"> | <div class="dropdown-menu"> | ||||
</div> | </div> | ||||
{% endblock user_menu %} | {% endblock user_menu %} | ||||
</li> | </li> | ||||
<!-- Messages Dropdown Menu --> | |||||
<li class="nav-item"> | |||||
<a href="{{ path('sov_admin_reminder_render_modal') }}" class="btn btn-sm btn-outline-info btn-reminder" data-crud-action="{{ ea.request.query.get('crudAction') }}" data-crud-controller-fqcn="{{ ea.request.query.get('crudControllerFqcn') }}"> | |||||
<i class="action-icon fa fa-plus"></i> | |||||
Pense-bête | |||||
</a> | |||||
</li> | |||||
<li class="nav-item"> | <li class="nav-item"> | ||||
<a href="{{ path(homepage_route()) }}" class="btn btn-block btn-outline-success" target="_blank" | |||||
<a href="{{ path(homepage_route()) }}" class="btn btn-sm btn-block btn-outline-success" target="_blank" | |||||
rel="noreferrer"> | rel="noreferrer"> | ||||
<i class="action-icon fa fa-eye"></i> | |||||
Afficher le site | Afficher le site | ||||
</a> | </a> | ||||
</li> | </li> |
{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} | {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #} | ||||
{% use '@EasyAdmin/crud/form_theme.html.twig' %} | {% use '@EasyAdmin/crud/form_theme.html.twig' %} | ||||
{% block form_start %} | |||||
{% if form.vars.errors|length > 0 and 'ea_crud' in form.vars.block_prefixes|default([]) %} | |||||
{{ form_errors(form) }} | |||||
{% endif %} | |||||
{%- do form.setMethodRendered() -%} | |||||
{% set method = method|upper %} | |||||
{%- if method in ["GET", "POST"] -%} | |||||
{% set form_method = method %} | |||||
{%- else -%} | |||||
{% set form_method = "POST" %} | |||||
{%- endif -%} | |||||
<form{% if name != '' %} name="{{ name }}"{% endif %} method="{{ form_method|lower }}"{% if action != '' %} action="{{ action }}"{% endif %}{{ block('attributes') }}{% if multipart %} enctype="multipart/form-data"{% endif %}> | |||||
{%- if form_method != method -%} | |||||
<input type="hidden" name="_method" value="{{ method }}" /> | |||||
{%- endif -%} | |||||
<input type="hidden" name="referrer" value="{% if ea is defined %}{{ ea.request.query.get('referrer') }}{% endif %}"> | |||||
{% endblock form_start %} | |||||
{% block form_row %} | {% block form_row %} | ||||
{% set row_attr = row_attr|merge({ | {% set row_attr = row_attr|merge({ | ||||
class: row_attr.class|default('') ~ ' form-group' | class: row_attr.class|default('') ~ ' form-group' |
<div class="modal fade show" id="{% block id %}{% endblock %}"> | |||||
<div class="modal show" id="{% block id %}{% endblock %}"> | |||||
<div class="modal-dialog {% block size %}{% endblock %}"> | <div class="modal-dialog {% block size %}{% endblock %}"> | ||||
{% block form_start %}{% endblock %} | {% block form_start %}{% endblock %} | ||||
<div class="modal-content"> | <div class="modal-content"> | ||||
{% endblock %} | {% endblock %} | ||||
</div> | </div> | ||||
{% block form_end %}{% endblock %} | {% block form_end %}{% endblock %} | ||||
<!-- /.modal-content --> | |||||
</div> | </div> | ||||
</div> | </div> |
{% endif %} | {% endif %} | ||||
{% endif %} | {% endif %} | ||||
{% block append_body %}{% endblock %} | {% block append_body %}{% endblock %} | ||||
</body> | </body> |
namespace Lc\SovBundle\Twig; | namespace Lc\SovBundle\Twig; | ||||
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | |||||
use Lc\SovBundle\Factory\Reminder\ReminderFactory; | |||||
use Lc\SovBundle\Form\Reminder\ReminderAdminFormType; | |||||
use Lc\SovBundle\Translation\TranslatorAdmin; | use Lc\SovBundle\Translation\TranslatorAdmin; | ||||
use Liip\ImagineBundle\Imagine\Cache\CacheManager; | use Liip\ImagineBundle\Imagine\Cache\CacheManager; | ||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | ||||
use Symfony\Component\Form\FormFactoryInterface; | |||||
use Symfony\Component\HttpFoundation\RequestStack; | use Symfony\Component\HttpFoundation\RequestStack; | ||||
use Symfony\Component\HttpKernel\KernelInterface; | use Symfony\Component\HttpKernel\KernelInterface; | ||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||||
protected $router; | protected $router; | ||||
protected $translator; | protected $translator; | ||||
protected $translatorAdmin; | protected $translatorAdmin; | ||||
protected $formFactory; | |||||
protected $reminderFactory; | |||||
public function __construct( | public function __construct( | ||||
KernelInterface $kernel, | KernelInterface $kernel, | ||||
RequestStack $requestStack, | RequestStack $requestStack, | ||||
UrlGeneratorInterface $router, | UrlGeneratorInterface $router, | ||||
TranslatorInterface $translator, | TranslatorInterface $translator, | ||||
TranslatorAdmin $translatorAdmin | |||||
TranslatorAdmin $translatorAdmin, | |||||
FormFactoryInterface $formFactory, | |||||
ReminderFactory $reminderFactory | |||||
) { | ) { | ||||
$this->kernel = $kernel; | $this->kernel = $kernel; | ||||
$this->parameterBag = $parameterBag; | $this->parameterBag = $parameterBag; | ||||
$this->router = $router; | $this->router = $router; | ||||
$this->translator = $translator; | $this->translator = $translator; | ||||
$this->translatorAdmin = $translatorAdmin; | $this->translatorAdmin = $translatorAdmin; | ||||
$this->formFactory = $formFactory; | |||||
$this->reminderFactory = $reminderFactory; | |||||
} | } | ||||
public function getFunctions() | public function getFunctions() | ||||
new TwigFunction('lc_liip', [$this, 'lcLiip']), | new TwigFunction('lc_liip', [$this, 'lcLiip']), | ||||
new TwigFunction('homepage_route', [$this, 'homepageRoute']), | new TwigFunction('homepage_route', [$this, 'homepageRoute']), | ||||
new TwigFunction('page_by_dev_alias', [$this, 'getPageByDevAlias']), | new TwigFunction('page_by_dev_alias', [$this, 'getPageByDevAlias']), | ||||
new TwigFunction('translated_urls', [$this, 'getTranslatedUrls']) | |||||
new TwigFunction('translated_urls', [$this, 'getTranslatedUrls']), | |||||
new TwigFunction('sov_get_form_reminder', [$this, 'getFormReminder']), | |||||
); | ); | ||||
} | } | ||||
public function lcTransAdminField($fieldName, $entityClass) | public function lcTransAdminField($fieldName, $entityClass) | ||||
{ | { | ||||
return $this->translatorAdmin->transField($fieldName, $entityClass) ; | |||||
return $this->translatorAdmin->transField($fieldName, $entityClass); | |||||
} | } | ||||
public function lcTransAdminHelp($fieldName, $entityClass) | public function lcTransAdminHelp($fieldName, $entityClass) | ||||
{ | { | ||||
return $this->translatorAdmin->transHelp($fieldName, $entityClass) ; | |||||
return $this->translatorAdmin->transHelp($fieldName, $entityClass); | |||||
} | } | ||||
public function lcTransAdminPanel($panelName, $entityClass) | public function lcTransAdminPanel($panelName, $entityClass) | ||||
{ | { | ||||
return $this->translatorAdmin->transPanel($panelName, $entityClass) ; | |||||
return $this->translatorAdmin->transPanel($panelName, $entityClass); | |||||
} | } | ||||
public function lcTransAdminMenu($menuName) | public function lcTransAdminMenu($menuName) | ||||
public function lcTransAdminTitle($pageName, $entityClass = null, $params = []) | public function lcTransAdminTitle($pageName, $entityClass = null, $params = []) | ||||
{ | { | ||||
return $this->translatorAdmin->transTitle($pageName, $entityClass, $params) ; | |||||
return $this->translatorAdmin->transTitle($pageName, $entityClass, $params); | |||||
} | } | ||||
public function lcLiip($path, $thumb = 'tile', $default = 'default.jpg') | public function lcLiip($path, $thumb = 'tile', $default = 'default.jpg') | ||||
return $this->parameterBag->get('lc_sov.homepage_route'); | return $this->parameterBag->get('lc_sov.homepage_route'); | ||||
} | } | ||||
public function getFormReminder() | |||||
{ | |||||
$reminder = $this->reminderFactory->create(); | |||||
$formReminder = $this->formFactory->create(ReminderAdminFormType::class, $reminder); | |||||
return $formReminder->createView(); | |||||
} | |||||
} | } |