infinito/application/symfony/src/Controller/DefaultController.php
2019-02-26 14:38:30 +01:00

30 lines
792 B
PHP

<?php
namespace Infinito\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Infinito\Domain\FixtureManagement\FixtureSource\HomepageFixtureSource;
use Infinito\DBAL\Types\Meta\Right\LayerType;
use Infinito\DBAL\Types\RESTResponseType;
/**
* This controller offers the standart routes for the template.
*
* @author kevinfrantz
*/
final class DefaultController extends AbstractController
{
/**
* @Route("/", name="homepage")
*/
public function homepage(): Response
{
return $this->redirectToRoute('infinito_api_rest_layer_read', [
'identity' => HomepageFixtureSource::SLUG,
'layer' => LayerType::SOURCE,
'_format' => RESTResponseType::HTML,
]);
}
}