<?php
namespace App\Controller\Frontend;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Doctrine\ORM\EntityManagerInterface;
use App\Service\TextHelper;
class LegalController extends AbstractController
{
/**
* @Route(
*{
*"es":"{_locale}/aviso-legal",
*"ca":"{_locale}/aviso-legal",
*"en":"{_locale}/aviso-legal",
*}, name="legal")
*/
public function index(TextHelper $textHelper)
{
$text = ($textHelper->getByCode('legal')) ? $textHelper->getByCode('legal') : [];
return $this->render('Frontend/legal/legal.html.twig', ['text' => $text]);
}
/**
* @Route(
*{
*"es":"{_locale}/politica-privacidad",
*"ca":"{_locale}/politica-privacidad",
*"en":"{_locale}/politica-privacidad",
*}, name="privacy")
*/
public function privacy(TextHelper $textHelper)
{
$text = ($textHelper->getByCode('privacy')) ? $textHelper->getByCode('privacy') : [];
return $this->render('Frontend/legal/privacy.html.twig', ['text' => $text]);
}
/**
* @Route(
*{
*"es":"{_locale}/politica-privacidad-redes-sociales",
*"ca":"{_locale}/politica-privacidad-redes-sociales",
*"en":"{_locale}/politica-privacidad-redes-sociales",
*}, name="privacysm")
*/
public function privacysm(TextHelper $textHelper)
{
$text = ($textHelper->getByCode('privacysm')) ? $textHelper->getByCode('privacysm') : [];
return $this->render('Frontend/legal/privacy_sm.html.twig', ['text' => $text]);
}
/**
* @Route(
*{
*"es":"{_locale}/politica-cookies",
*"ca":"{_locale}/politica-cookies",
*"en":"{_locale}/politica-cookies",
*}, name="cookies")
*/
public function cookies(TextHelper $textHelper)
{
$text = ($textHelper->getByCode('cookies')) ? $textHelper->getByCode('cookies') : [];
return $this->render('Frontend/legal/cookies.html.twig', ['text' => $text]);
}
}