mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-04-16 10:16:22 +02:00
Implemented draft
This commit is contained in:
parent
4485091813
commit
0b6570b4f8
@ -9,6 +9,7 @@ use Infinito\Controller\API\AbstractAPIController;
|
|||||||
use Infinito\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
use Infinito\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
||||||
use Infinito\Domain\MVCManagement\MVCRoutineServiceInterface;
|
use Infinito\Domain\MVCManagement\MVCRoutineServiceInterface;
|
||||||
use Infinito\DBAL\Types\ActionType;
|
use Infinito\DBAL\Types\ActionType;
|
||||||
|
use Infinito\Attribut\ClassAttributInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
@ -30,12 +31,15 @@ final class LayerController extends AbstractAPIController
|
|||||||
* ".{_format}",
|
* ".{_format}",
|
||||||
* methods={"GET","POST"}
|
* methods={"GET","POST"}
|
||||||
* )
|
* )
|
||||||
* {@inheritdoc}
|
* @todo Mayber create an own controller for sources, because they have some special logic!
|
||||||
*
|
|
||||||
* @see \Infinito\Controller\API\AbstractAPIController::read()
|
|
||||||
*/
|
*/
|
||||||
public function create(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, string $layer, $identity): Response
|
public function create(Request $request,MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, string $layer): Response
|
||||||
{
|
{
|
||||||
|
//Not implemented yet in MVC routine. This is just a draft!
|
||||||
|
if($request->query->has(ClassAttributInterface::CLASS_ATTRIBUT_NAME)){
|
||||||
|
$class = $request->query->get(ClassAttributInterface::CLASS_ATTRIBUT_NAME);
|
||||||
|
$requestedActionService->getRequestedEntity()->setClass($class);
|
||||||
|
}
|
||||||
$requestedActionService->setActionType(ActionType::CREATE);
|
$requestedActionService->setActionType(ActionType::CREATE);
|
||||||
$requestedActionService->setLayer($layer);
|
$requestedActionService->setLayer($layer);
|
||||||
$view = $mvcRoutineService->process();
|
$view = $mvcRoutineService->process();
|
||||||
@ -48,9 +52,6 @@ final class LayerController extends AbstractAPIController
|
|||||||
* "/{identity}.{_format}",
|
* "/{identity}.{_format}",
|
||||||
* methods={"GET"}
|
* methods={"GET"}
|
||||||
* )
|
* )
|
||||||
* {@inheritdoc}
|
|
||||||
*
|
|
||||||
* @see \Infinito\Controller\API\AbstractAPIController::read()
|
|
||||||
*/
|
*/
|
||||||
public function read(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, string $layer, $identity): Response
|
public function read(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, string $layer, $identity): Response
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user