mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-04-18 19:09:20 +02:00
Implemented read controller logic for source
This commit is contained in:
parent
6083c51c2e
commit
b23faaa535
@ -28,7 +28,7 @@ abstract class AbstractAPIController extends AbstractController
|
|||||||
*
|
*
|
||||||
* @return Response
|
* @return Response
|
||||||
*/
|
*/
|
||||||
abstract public function read(Request $request, $identifier): Response;
|
// abstract public function read(Request $request, $identifier): Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Request $request HTTP Method PUT
|
* @param Request $request HTTP Method PUT
|
||||||
|
@ -6,6 +6,10 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use App\Controller\API\AbstractAPIController;
|
use App\Controller\API\AbstractAPIController;
|
||||||
|
use App\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
||||||
|
use App\Domain\MVCManagement\MVCRoutineServiceInterface;
|
||||||
|
use App\DBAL\Types\ActionType;
|
||||||
|
use App\DBAL\Types\Meta\Right\LayerType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
@ -23,8 +27,14 @@ class SourceApiController extends AbstractAPIController
|
|||||||
*
|
*
|
||||||
* @see \App\Controller\API\AbstractAPIController::read()
|
* @see \App\Controller\API\AbstractAPIController::read()
|
||||||
*/
|
*/
|
||||||
public function read(Request $request, $identifier): Response
|
public function read(MVCRoutineServiceInterface $mvcRoutineService, RequestedActionServiceInterface $requestedActionService, $identifier): Response
|
||||||
{
|
{
|
||||||
|
$requestedActionService->setActionType(ActionType::READ);
|
||||||
|
$requestedActionService->setLayer(LayerType::SOURCE);
|
||||||
|
$requestedActionService->getRequestedEntity()->setIdentity($identifier);
|
||||||
|
$view = $mvcRoutineService->process();
|
||||||
|
|
||||||
|
return $this->handleView($view);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user