src/Controller/Frontend/LegalController.php line 35

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Frontend;
  3. use Symfony\Component\HttpFoundation\Response;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Doctrine\ORM\EntityManagerInterface;
  7. use App\Service\TextHelper;
  8. class LegalController extends AbstractController
  9. {
  10.     /**
  11.      * @Route(
  12.      *{
  13.      *"es":"{_locale}/aviso-legal",
  14.      *"ca":"{_locale}/aviso-legal",
  15.      *"en":"{_locale}/aviso-legal",
  16.      *}, name="legal")
  17.      */
  18.    public function index(TextHelper $textHelper)
  19.    {
  20.       $text = ($textHelper->getByCode('legal')) ? $textHelper->getByCode('legal') : [];
  21.       return $this->render('Frontend/legal/legal.html.twig', ['text' => $text]);
  22.    }
  23.     /**
  24.      * @Route(
  25.      *{
  26.      *"es":"{_locale}/politica-privacidad",
  27.      *"ca":"{_locale}/politica-privacidad",
  28.      *"en":"{_locale}/politica-privacidad",
  29.      *}, name="privacy")
  30.      */
  31.    public function privacy(TextHelper $textHelper)
  32.    {
  33.       $text = ($textHelper->getByCode('privacy')) ? $textHelper->getByCode('privacy') : [];
  34.       return $this->render('Frontend/legal/privacy.html.twig', ['text' => $text]);
  35.    }
  36.    /**
  37.     * @Route(
  38.     *{
  39.     *"es":"{_locale}/politica-privacidad-redes-sociales",
  40.     *"ca":"{_locale}/politica-privacidad-redes-sociales",
  41.     *"en":"{_locale}/politica-privacidad-redes-sociales",
  42.     *}, name="privacysm")
  43.     */
  44.   public function privacysm(TextHelper $textHelper)
  45.   {
  46.      $text = ($textHelper->getByCode('privacysm')) ? $textHelper->getByCode('privacysm') : [];
  47.      return $this->render('Frontend/legal/privacy_sm.html.twig', ['text' => $text]);
  48.   }
  49.     /**
  50.      * @Route(
  51.      *{
  52.      *"es":"{_locale}/politica-cookies",
  53.      *"ca":"{_locale}/politica-cookies",
  54.      *"en":"{_locale}/politica-cookies",
  55.      *}, name="cookies")
  56.      */
  57.    public function cookies(TextHelper $textHelper)
  58.    {
  59.       $text = ($textHelper->getByCode('cookies')) ? $textHelper->getByCode('cookies') : [];
  60.       return $this->render('Frontend/legal/cookies.html.twig', ['text' => $text]);
  61.    }
  62. }