Substituted controllers through general layer controller

This commit is contained in:
Kevin Frantz 2019-02-24 15:10:25 +01:00
parent 724ff63880
commit baf14680fe
6 changed files with 6 additions and 151 deletions

View File

@ -1,35 +0,0 @@
<?php
namespace Infinito\Controller\API\Rest;
use Infinito\Controller\API\AbstractAPIController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author kevinfrantz
*
* @todo Implement!
*/
final class HeredityController extends AbstractAPIController
{
// public function read(Request $request, $identifier): Response
// {
// }
// public function create(Request $request, SecureCRUDFactoryService $crudFactory): Response
// {
// }
// public function update(Request $request, $identifier): Response
// {
// }
// public function list(Request $request): Response
// {
// }
// public function delete(Request $request, $identifier): Response
// {
// }
}

View File

@ -1,35 +0,0 @@
<?php
namespace Infinito\Controller\API\Rest;
use Infinito\Controller\API\AbstractAPIController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author kevinfrantz
*
* @todo Implement!
*/
final class LawController extends AbstractAPIController
{
// public function read(Request $request, $identifier): Response
// {
// }
// public function create(Request $request, SecureCRUDFactoryService $crudFactory): Response
// {
// }
// public function update(Request $request, $identifier): Response
// {
// }
// public function list(Request $request): Response
// {
// }
// public function delete(Request $request, $identifier): Response
// {
// }
}

View File

@ -9,7 +9,6 @@ use Infinito\Controller\API\AbstractAPIController;
use Infinito\Domain\RequestManagement\Action\RequestedActionServiceInterface;
use Infinito\Domain\MVCManagement\MVCRoutineServiceInterface;
use Infinito\DBAL\Types\ActionType;
use Infinito\DBAL\Types\Meta\Right\LayerType;
/**
* @author kevinfrantz
@ -18,11 +17,7 @@ use Infinito\DBAL\Types\Meta\Right\LayerType;
* @see https://symfony.com/blog/new-in-symfony-4-1-internationalized-routing
* @Route(
* {
* "en":"/api/rest/source/{identity}.{_format}",
* "de":"/api/rest/quelle/{identity}.{_format}",
* "eo":"/api/rest/fonto/{identity}.{_format}",
* "es":"/api/rest/fontanar/{identity}.{_format}",
* "nl":"/api/rest/bron/{identity}.{_format}"
* "en":"/api/rest/{layer}/{identity}.{_format}",
* },
* defaults={
* "identity"="",
@ -30,7 +25,7 @@ use Infinito\DBAL\Types\Meta\Right\LayerType;
* }
* )
*/
final class SourceController extends AbstractAPIController
final class LayerController extends AbstractAPIController
{
/**
* @Route(
@ -40,10 +35,10 @@ final class SourceController extends AbstractAPIController
*
* @see \Infinito\Controller\API\AbstractAPIController::read()
*/
public function read(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, $identity): Response
public function read(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, $layer, $identity): Response
{
$requestedActionService->setActionType(ActionType::READ);
$requestedActionService->setLayer(LayerType::SOURCE);
$requestedActionService->setLayer($layer);
$requestedActionService->getRequestedEntity()->setIdentity($identity);
$view = $mvcRoutineService->process();

View File

@ -1,35 +0,0 @@
<?php
namespace Infinito\Controller\API\Rest;
use Infinito\Controller\API\AbstractAPIController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author kevinfrantz
*
* @todo Implement!
*/
final class MemberController extends AbstractAPIController
{
// public function read(Request $request, $identifier): Response
// {
// }
// public function create(Request $request, SecureCRUDFactoryService $crudFactory): Response
// {
// }
// public function update(Request $request, $identifier): Response
// {
// }
// public function list(Request $request): Response
// {
// }
// public function delete(Request $request, $identifier): Response
// {
// }
}

View File

@ -1,35 +0,0 @@
<?php
namespace Infinito\Controller\API\Rest;
use Infinito\Controller\API\AbstractAPIController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* @author kevinfrantz
*
* @todo Implement!
*/
final class RightController extends AbstractAPIController
{
// public function read(Request $request, $identifier): Response
// {
// }
// public function create(Request $request, SecureCRUDFactoryService $crudFactory): Response
// {
// }
// public function update(Request $request, $identifier): Response
// {
// }
// public function list(Request $request): Response
// {
// }
// public function delete(Request $request, $identifier): Response
// {
// }
}

View File

@ -133,7 +133,7 @@ final class EntityDomService implements EntityDomServiceInterface
/**
* {@inheritdoc}
*
* @see \Infinito\Domain\HtmlManagement\EntityDomServiceInterface::getDomDocument()
* @see \Infinito\Domain\DomManagement\EntityDomServiceInterface::getDomDocument()
*/
public function getDomDocument(EntityInterface $entity): \DOMDocument
{
@ -147,7 +147,7 @@ final class EntityDomService implements EntityDomServiceInterface
if ($value instanceof Collection) {
foreach ($value as $valueElement) {
$domSubElement = $domElement->createElement('list-element');
$this->mappValue($value, $domSubElement);
$this->mappValue($valueElement, $domSubElement);
}
} else {
$this->mappValue($value, $domElement);