mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2024-12-04 23:17:19 +01: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
|
||||
*/
|
||||
abstract public function read(Request $request, $identifier): Response;
|
||||
// abstract public function read(Request $request, $identifier): Response;
|
||||
|
||||
/**
|
||||
* @param Request $request HTTP Method PUT
|
||||
|
@ -6,6 +6,10 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
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
|
||||
@ -23,8 +27,14 @@ class SourceApiController extends AbstractAPIController
|
||||
*
|
||||
* @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…
Reference in New Issue
Block a user