<?php
namespace App\Controller\Front;
use App\Manager\BrandManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class BrandController extends AbstractController
{
protected array $locals = [];
public function __construct()
{
$this->locals['menu_active'] = '';
}
/**
* @Route("/marca/{slug}/", name="brand")
* @Template("front/brand/brand.html.twig")
*/
public function brand(String $slug, BrandManager $brandManager): array
{
$brand = $brandManager->bySlug($slug);
$this->locals['brand'] = $brand;
return $this->locals;
}
}