path: / | path: / | ||||
controller: App\Controller\Frontend\HomeController:home | controller: App\Controller\Frontend\HomeController:home | ||||
app_politique: | |||||
path: /politique-confidentialite | |||||
controller: App\Controller\Frontend\PageController::politique | |||||
app_legal_mention: | app_legal_mention: | ||||
path: /mentions-legales | path: /mentions-legales | ||||
controller: App\Controller\Frontend\MentionController::mention | |||||
controller: App\Controller\Frontend\PageController::mention | |||||
app_carto_interactive: | app_carto_interactive: | ||||
path: /cartographie-interactive | path: /cartographie-interactive |
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField; | ||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | ||||
use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController; | use Lc\SovBundle\Controller\AbstractAdminController as AbstractCrudController; | ||||
use Lc\SovBundle\Field\CKEditorField; | |||||
use Lc\SovBundle\Field\FileManagerField; | |||||
use Lc\SovBundle\Field\GalleryManagerField; | |||||
use Lc\SovBundle\Field\ImageManagerField; | |||||
use Lc\SovBundle\Field\StatusField; | use Lc\SovBundle\Field\StatusField; | ||||
class PageCrudController extends AbstractCrudController | class PageCrudController extends AbstractCrudController | ||||
public function configureFields(string $pageName): iterable | public function configureFields(string $pageName): iterable | ||||
{ | { | ||||
$panel = parent::configureFields($pageName); | |||||
return array_merge( | |||||
return | |||||
[ | [ | ||||
FormField::addPanel('general'), | FormField::addPanel('general'), | ||||
TextField::new('title'), | TextField::new('title'), | ||||
TextEditorField::new('description'), | TextEditorField::new('description'), | ||||
StatusField::new('status'), | StatusField::new('status'), | ||||
], | |||||
$panel | |||||
); | |||||
]; | |||||
} | } | ||||
} | } |
use App\Entity\Site\Page; | use App\Entity\Site\Page; | ||||
use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
class MentionController extends DefaultController | |||||
class PageController extends DefaultController | |||||
{ | { | ||||
public function mention(): Response | public function mention(): Response | ||||
{ | { | ||||
] | ] | ||||
); | ); | ||||
} | } | ||||
public function politique(): Response | |||||
{ | |||||
$pageRepository = $this->em->getRepository(Page::class); | |||||
return $this->render( | |||||
'page/page.html.twig', | |||||
[ | |||||
'controller_name' => 'IndexController', | |||||
'page' => $pageRepository->findOneByDevAlias('politique') | |||||
] | |||||
); | |||||
} | |||||
} | } |
</div> | </div> | ||||
<div class="bar-footer"> | <div class="bar-footer"> | ||||
© 2021 par la Coopérative des Citoyens | <a href="{{ path('app_legal_mention') }}" title="Mentions légales">Mentions | © 2021 par la Coopérative des Citoyens | <a href="{{ path('app_legal_mention') }}" title="Mentions légales">Mentions | ||||
légales</a> | <a href="" title="Utilisation des cookies">Utilisation des cookies</a> | Création <a | |||||
légales</a> | <a href="{{ path('app_politique') }}" title="Politique de Confidentialité">Politique de Confidentialité</a> | Création <a | |||||
href="https://www.laclic.fr/" title="La Clic !" target="_blank">LA CLIC !</a> | href="https://www.laclic.fr/" title="La Clic !" target="_blank">LA CLIC !</a> | ||||
</div> | </div> | ||||
</footer> | </footer> |