Implemented more parts of imprint

This commit is contained in:
Kevin Frantz 2019-02-16 17:39:51 +01:00
parent 6126c96cbb
commit 7dae633ec7
2 changed files with 25 additions and 13 deletions

View File

@ -8,6 +8,7 @@ use App\Domain\MVCManagement\MVCRoutineServiceInterface;
use App\Domain\RequestManagement\Action\RequestedActionServiceInterface;
use App\DBAL\Types\ActionType;
use App\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
use App\DBAL\Types\Meta\Right\LayerType;
/**
* This controller offers the standart routes for the template.
@ -16,19 +17,20 @@ use App\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
*/
final class DefaultController extends AbstractController
{
// /**
// * @deprecated Use load via source instead of fixed route
// *
// * @todo Optimize function!
// * @Route("/imprint.{_format}", defaults={"_format"="json"}, name="imprint")
// */
// public function imprint(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService): Response
// {
// // $requestedActionService->setActionType(ActionType::READ);
// // $requestedActionService->getRequestedEntity()->setSlug(ImpressumFixtureSource::SLUG);
// // $view = $mvcRoutineService->process();
// // $this->handleView($view);
// }
/**
* @deprecated Use load via source instead of fixed route
*
* @todo Optimize function!
* @Route("/imprint.{_format}", defaults={"_format"="json"}, name="imprint")
*/
public function imprint(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService): Response
{
$requestedActionService->setActionType(ActionType::READ);
$requestedActionService->setLayer(LayerType::SOURCE);
$requestedActionService->getRequestedEntity()->setSlug(ImpressumFixtureSource::SLUG);
$view = $mvcRoutineService->process();
$this->handleView($view);
}
/**
* @Route("/", name="homepage")

View File

@ -95,11 +95,21 @@ final class TemplateNameService implements TemplateNameServiceInterface
return $this->getBasePath().$type.$this->getShortName().$this->getActionSuffix().self::TWIG_SUFFIX;
}
/**
* {@inheritdoc}
*
* @see \App\Domain\TemplateManagement\TemplateNameServiceInterface::getAtomTemplateName()
*/
public function getAtomTemplateName(): string
{
return $this->getTemplatePath(self::ATOM_PRAEFFIX);
}
/**
* {@inheritdoc}
*
* @see \App\Domain\TemplateManagement\TemplateNameServiceInterface::getMoleculeTemplateName()
*/
public function getMoleculeTemplateName(): string
{
return $this->getTemplatePath(self::MOLECULE_PRAEFFIX);