2018-09-05 09:11:08 +02:00
|
|
|
<?php
|
2018-09-12 22:25:22 +02:00
|
|
|
|
2018-09-05 09:11:08 +02:00
|
|
|
namespace App\Controller;
|
|
|
|
|
|
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
2018-11-23 23:22:17 +01:00
|
|
|
use App\DBAL\Types\SystemSlugType;
|
|
|
|
use App\Entity\Source\AbstractSource;
|
2018-09-05 09:11:08 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*/
|
2018-11-23 23:22:17 +01:00
|
|
|
class DefaultController extends AbstractEntityController
|
2018-09-05 09:11:08 +02:00
|
|
|
{
|
2018-09-05 18:11:35 +02:00
|
|
|
/**
|
2018-11-23 23:22:17 +01:00
|
|
|
* @todo Optimize function!
|
2018-09-05 18:11:35 +02:00
|
|
|
* @Route("/imprint", name="imprint")
|
|
|
|
*/
|
2018-09-05 09:11:08 +02:00
|
|
|
public function imprint(): Response
|
|
|
|
{
|
2018-11-23 23:22:17 +01:00
|
|
|
$source = $this->loadEntityBySlug(SystemSlugType::IMPRINT);
|
|
|
|
$view = $this->view($source, 200)
|
|
|
|
->setTemplate('standard/imprint.html.twig')
|
|
|
|
->setTemplateVar('source');
|
|
|
|
|
|
|
|
return $this->handleView($view);
|
2018-09-05 09:11:08 +02:00
|
|
|
}
|
2018-09-12 22:25:22 +02:00
|
|
|
|
2018-09-05 09:11:08 +02:00
|
|
|
/**
|
|
|
|
* @Route("/", name="homepage")
|
|
|
|
*/
|
|
|
|
public function homepage(): Response
|
|
|
|
{
|
2018-09-12 22:25:22 +02:00
|
|
|
return $this->render('standard/homepage.html.twig');
|
2018-09-05 09:11:08 +02:00
|
|
|
}
|
2018-11-23 23:22:17 +01:00
|
|
|
|
|
|
|
protected function setEntityName(): void
|
|
|
|
{
|
|
|
|
$this->entityName = AbstractSource::class;
|
|
|
|
}
|
2018-09-05 09:11:08 +02:00
|
|
|
}
|