mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 21:57:16 +02:00
Refactored draft for Request Management
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ViewManagement;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
use App\Domain\RequestManagement\RequestedUser;
|
||||
use App\Domain\SecureCRUDManagement\Factory\SecureCRUDFactoryService;
|
||||
use App\Domain\SecureCRUDManagement\Factory\SecureCRUDFactoryServiceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class AbstractViewBuilder implements ViewBuilderInterface
|
||||
{
|
||||
/**
|
||||
* @var View
|
||||
*/
|
||||
protected $view;
|
||||
|
||||
/**
|
||||
* @var SecureCRUDFactoryServiceInterface
|
||||
*/
|
||||
protected $secureCrudFactoryService;
|
||||
|
||||
/**
|
||||
* @param RequestedUser $requestedUserRight
|
||||
* @param SecureCRUDFactoryService $secureCrudFactoryService
|
||||
*/
|
||||
public function __construct(RequestedUser $requestedUserRight, SecureCRUDFactoryService $secureCrudFactoryService)
|
||||
{
|
||||
$this->view = new View();
|
||||
$this->requestedUserRight = $requestedUserRight;
|
||||
$this->secureCrudFactoryService = $secureCrudFactoryService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return View
|
||||
*/
|
||||
public function getView(): View
|
||||
{
|
||||
$this->secureCrudFactoryService->create($requestedRight);
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\ViewManagement;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ViewBuilderInterface
|
||||
{
|
||||
/**
|
||||
* @return View
|
||||
*/
|
||||
public function getView(): View;
|
||||
}
|
Reference in New Issue
Block a user