src/Controller/Front/SparePartController.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Controller\Front;
  3. use App\Manager\SparePartsManager;
  4. use App\Manager\SparePartsWarrantyManager;
  5. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  6. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class SparePartController extends AbstractController
  9. {
  10.     protected array $locals = [];
  11.     public function __construct()
  12.     {
  13.         $this->locals['menu_active'] = '';
  14.     }
  15.     /**
  16.      * @Route("/repuestos", name="spare_parts")
  17.      * @Template("front/spare_parts/spare_parts.html.twig")
  18.      */
  19.     public function spareParts(SparePartsManager $sparePartsManager): array
  20.     {
  21.         $this->locals['sd'] = $sparePartsManager->find(1);
  22.         return $this->locals;
  23.     }
  24.     /**
  25.      * @Route("/garantia-de-repuestos", name="spare_parts_warranty")
  26.      * @Template("front/spare_parts/spare_parts_warranty.html.twig")
  27.      */
  28.     public function sparePart(SparePartsWarrantyManager $sparePartsWarrantyManager): array
  29.     {
  30.         $this->locals['sd'] = $sparePartsWarrantyManager->find(1);
  31.         return $this->locals;
  32.     }
  33. }