Se agregan menus
This commit is contained in:
18
common/Controller/Web/Galeria.php
Normal file
18
common/Controller/Web/Galeria.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace ProVM\TotalSport\Common\Controller\Web;
|
||||
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Slim\Views\Blade as View;
|
||||
use ProVM\TotalSport\Common\Service\DataHandler;
|
||||
use ProVM\TotalSport\Common\Service\MediaLoader;
|
||||
|
||||
class Galeria {
|
||||
public function __invoke(Request $request, Response $response, View $view, DataHandler $handler, MediaLoader $loader, $evento): Response {
|
||||
$galeria = $handler->load('galeria');
|
||||
$e = $galeria[$evento];
|
||||
$imagenes = $loader->load($e);
|
||||
return $view->render($response, 'evento', ['evento' => $e, 'imagenes' => $imagenes]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user