<?php
namespace App\Controller;
use App\Utils\EventoService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class EventoController extends AbstractController
{
private $eventoService;
public function __construct(EventoService $eventoService)
{
$this->eventoService = $eventoService;
}
public function events()
{
//Metaetiquetas para la pagina principal
$url = 'eventsfrontend';
//seo on page
$seo_on_page = $this->eventoService->DevolverSeoOnPage($url);
//eventos
$eventos = $this->eventoService->ListarEventos();
// usuarios
$usuarios = $this->eventoService->ListarUsuarios();
return $this->render('frontend/evento/index.html.twig', array(
'seo_on_page' => $seo_on_page,
'eventos' => $eventos,
'usuarios' => $usuarios
));
}
}