src/Controller/Front/LegalController.php line 39

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Manager\ARCORightsManager;
  4. use App\Manager\CookiesPolicyManager;
  5. use App\Manager\DataProtectionPoliciesManager;
  6. use App\Manager\LegalManager;
  7. use App\Manager\TermsAndConditionsManager;
  8. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  9. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  10. use Symfony\Component\Routing\Annotation\Route;
  11. class LegalController extends AbstractController
  12. {
  13.     protected array $locals = [];
  14.     public function __construct(LegalManager $legalManager)
  15.     {
  16.         $this->locals['legal'] = $legalManager->find(1);
  17.         $this->locals['menu_active'] = '';
  18.     }
  19.     /**
  20.      * @Route("/politicas-de-proteccion-de-datos", name="data_protection_policies")
  21.      * @Template("front/legal/data_protection_policies.html.twig")
  22.      */
  23.     public function dataProtectionPolicies(DataProtectionPoliciesManager $dataProtectionPoliciesManager): array
  24.     {
  25.         $this->locals['sd'] = $dataProtectionPoliciesManager->find(1);
  26.         $this->locals['legal_active'] = 'data_protection_policies';
  27.         return $this->locals;
  28.     }
  29.     /**
  30.      * @Route("/politicas-de-cookies", name="cookies_policy")
  31.      * @Template("front/legal/cookies_policy.html.twig")
  32.      */
  33.     public function cookiesPolicy(CookiesPolicyManager $cookiesPolicyManager): array
  34.     {
  35.         $this->locals['sd'] = $cookiesPolicyManager->find(1);
  36.         $this->locals['legal_active'] = 'cookies_policy';
  37.         return $this->locals;
  38.     }
  39.     /**
  40.      * @Route("/terminos-y-condiciones", name="terms_and_conditions")
  41.      * @Template("front/legal/terms_and_conditions.html.twig")
  42.      */
  43.     public function termsAndConditions(TermsAndConditionsManager $termsAndConditionsManager): array
  44.     {
  45.         $this->locals['sd'] = $termsAndConditionsManager->find(1);
  46.         $this->locals['legal_active'] = 'terms_and_conditions';
  47.         return $this->locals;
  48.     }
  49.     /**
  50.      * @Route("/derechos-arco", name="arco_rights")
  51.      * @Template("front/legal/arco_rights.html.twig")
  52.      */
  53.     public function arcoRights(ARCORightsManager $ARCORightsManager): array
  54.     {
  55.         $this->locals['sd'] = $ARCORightsManager->find(1);
  56.         $this->locals['legal_active'] = 'arco';
  57.         return $this->locals;
  58.     }
  59. }