src/Controller/Front/AfterSalesController.php line 34

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Manager\AfterSalesManager;
  4. use App\Manager\TechnicalAssistanceManager;
  5. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  6. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class AfterSalesController extends AbstractController
  9. {
  10.     protected array $locals = [];
  11.     public function __construct()
  12.     {
  13.         $this->locals['menu_active'] = '';
  14.     }
  15.     /**
  16.      * @Route("/postventa", name="after_sales")
  17.      * @Template("front/after_sales/after_sales.html.twig")
  18.      */
  19.     public function afterSales(AfterSalesManager $afterSalesManager): array
  20.     {
  21.         $this->locals['sd'] = $afterSalesManager->find(1);
  22.         return $this->locals;
  23.     }
  24.     /**
  25.      * @Route("/asistencia-tecnica-y-capacitacion", name="technical_assistance")
  26.      * @Template("front/after_sales/technical_assistance.html.twig")
  27.      */
  28.     public function technicalAssistance(TechnicalAssistanceManager $technicalAssistanceManagerAfterSalesManager $afterSalesManager): array
  29.     {
  30.         $this->locals['after_sales'] = $afterSalesManager->find(1);
  31.         $this->locals['sd'] = $technicalAssistanceManager->find(1);
  32.         $this->locals['page_type'] = 'technical_assistance';
  33.         return $this->locals;
  34.     }
  35. }