<?php
namespace App\Controller\Front;
use App\Manager\ARCORightsManager;
use App\Manager\CookiesPolicyManager;
use App\Manager\DataProtectionPoliciesManager;
use App\Manager\LegalManager;
use App\Manager\TermsAndConditionsManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class LegalController extends AbstractController
{
protected array $locals = [];
public function __construct(LegalManager $legalManager)
{
$this->locals['legal'] = $legalManager->find(1);
$this->locals['menu_active'] = '';
}
/**
* @Route("/politicas-de-proteccion-de-datos", name="data_protection_policies")
* @Template("front/legal/data_protection_policies.html.twig")
*/
public function dataProtectionPolicies(DataProtectionPoliciesManager $dataProtectionPoliciesManager): array
{
$this->locals['sd'] = $dataProtectionPoliciesManager->find(1);
$this->locals['legal_active'] = 'data_protection_policies';
return $this->locals;
}
/**
* @Route("/politicas-de-cookies", name="cookies_policy")
* @Template("front/legal/cookies_policy.html.twig")
*/
public function cookiesPolicy(CookiesPolicyManager $cookiesPolicyManager): array
{
$this->locals['sd'] = $cookiesPolicyManager->find(1);
$this->locals['legal_active'] = 'cookies_policy';
return $this->locals;
}
/**
* @Route("/terminos-y-condiciones", name="terms_and_conditions")
* @Template("front/legal/terms_and_conditions.html.twig")
*/
public function termsAndConditions(TermsAndConditionsManager $termsAndConditionsManager): array
{
$this->locals['sd'] = $termsAndConditionsManager->find(1);
$this->locals['legal_active'] = 'terms_and_conditions';
return $this->locals;
}
/**
* @Route("/derechos-arco", name="arco_rights")
* @Template("front/legal/arco_rights.html.twig")
*/
public function arcoRights(ARCORightsManager $ARCORightsManager): array
{
$this->locals['sd'] = $ARCORightsManager->find(1);
$this->locals['legal_active'] = 'arco';
return $this->locals;
}
}