Expanded rights to also manage actions instead of just a cruds

This commit is contained in:
Kevin Frantz
2019-02-21 18:46:57 +01:00
parent 465d6d6d01
commit 3e91aed050
27 changed files with 91 additions and 98 deletions

View File

@@ -4,11 +4,6 @@ namespace Infinito\Controller;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Infinito\Domain\MVCManagement\MVCRoutineServiceInterface;
use Infinito\Domain\RequestManagement\Action\RequestedActionServiceInterface;
use Infinito\DBAL\Types\ActionType;
use Infinito\Domain\FixtureManagement\FixtureSource\ImpressumFixtureSource;
use Infinito\DBAL\Types\Meta\Right\LayerType;
/**
* This controller offers the standart routes for the template.
@@ -17,22 +12,6 @@ use Infinito\DBAL\Types\Meta\Right\LayerType;
*/
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->setLayer(LayerType::SOURCE);
$requestedActionService->getRequestedEntity()->setSlug(ImpressumFixtureSource::SLUG);
$view = $mvcRoutineService->process();
return $this->handleView($view);
}
/**
* @Route("/", name="homepage")
*/