<?php
namespace App\Controller\Front;
use App\Manager\SparePartsManager;
use App\Manager\SparePartsWarrantyManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class SparePartController extends AbstractController
{
protected array $locals = [];
public function __construct()
{
$this->locals['menu_active'] = '';
}
/**
* @Route("/repuestos", name="spare_parts")
* @Template("front/spare_parts/spare_parts.html.twig")
*/
public function spareParts(SparePartsManager $sparePartsManager): array
{
$this->locals['sd'] = $sparePartsManager->find(1);
return $this->locals;
}
/**
* @Route("/garantia-de-repuestos", name="spare_parts_warranty")
* @Template("front/spare_parts/spare_parts_warranty.html.twig")
*/
public function sparePart(SparePartsWarrantyManager $sparePartsWarrantyManager): array
{
$this->locals['sd'] = $sparePartsWarrantyManager->find(1);
return $this->locals;
}
}