<?php
namespace App\Controller\Front;
use App\Manager\AboutUsManager;
use App\Manager\HomeManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class DefaultController extends AbstractController
{
protected array $locals = [];
public function __construct()
{
$this->locals['menu_active'] = '';
}
/**
* @Route("/", name="home")
* @Template("front/default/home.html.twig")
*/
public function home(HomeManager $homeManager): array
{
$this->locals['sd'] = $homeManager->find(1);
return $this->locals;
}
/**
* @Route("/nosotros", name="about_us")
* @Template("front/default/about_us.html.twig")
*/
public function aboutUs(AboutUsManager $aboutUsManager): array
{
$this->locals['sd'] = $aboutUsManager->find(1);
return $this->locals;
}
}