mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized Template Management and implemented TemplateNameService
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
namespace App\Domain\ViewManagement;
|
||||
|
||||
use FOS\RestBundle\View\View;
|
||||
use App\Domain\SecureCRUDManagement\Factory\SecureCRUDFactoryService;
|
||||
use App\Domain\SecureCRUDManagement\Factory\SecureCRUDFactoryServiceInterface;
|
||||
use App\Domain\RequestManagement\User\RequestedUserInterface;
|
||||
use App\Domain\RequestManagement\Entity\RequestedEntityInterface;
|
||||
use App\Domain\RequestManagement\Action\RequestedActionInterface;
|
||||
use App\Domain\ActionManagement\ActionServiceInterface;
|
||||
use App\Domain\ActionManagement\ActionFactoryServiceInterface;
|
||||
use App\Domain\ActionManagement\ActionFactoryService;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -19,36 +19,23 @@ class ViewBuilder implements ViewBuilderInterface
|
||||
protected $view;
|
||||
|
||||
/**
|
||||
* @var SecureCRUDFactoryServiceInterface
|
||||
* @var RequestedActionInterface
|
||||
*/
|
||||
protected $secureCrudFactoryService;
|
||||
protected $actionService;
|
||||
|
||||
/**
|
||||
* @var RequestedEntityInterface
|
||||
* @var ActionFactoryServiceInterface
|
||||
*/
|
||||
protected $requestedEntity;
|
||||
protected $actionFactoryService;
|
||||
|
||||
/**
|
||||
* @var RequestedUserInterface
|
||||
* @param ActionServiceInterface $actionService
|
||||
* @param ActionFactoryServiceInterface $actionFactoryService
|
||||
*/
|
||||
protected $requestedUser;
|
||||
|
||||
/**
|
||||
* @param RequestedUserInterface $requestedUserRight
|
||||
* @param SecureCRUDFactoryService $secureCrudFactoryService
|
||||
*/
|
||||
public function __construct(RequestedUserInterface $requestedUserRight, SecureCRUDFactoryService $secureCrudFactoryService, RequestedEntityInterface $requestedEntity)
|
||||
public function __construct(ActionServiceInterface $actionService, ActionFactoryServiceInterface $actionFactoryService)
|
||||
{
|
||||
$this->view = new View();
|
||||
$this->requestedUser = $requestedUserRight;
|
||||
$this->secureCrudFactoryService = $secureCrudFactoryService;
|
||||
$this->requestedEntity = $requestedEntity;
|
||||
}
|
||||
|
||||
private function process()
|
||||
{
|
||||
$secureCrudService = $this->secureCrudFactoryService->create($this->requestedUser);
|
||||
$entity = $secureCrudService->process($this->requestedEntity);
|
||||
$this->actionService = $actionService;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,4 +44,24 @@ class ViewBuilder implements ViewBuilderInterface
|
||||
public function getView(): View
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \App\Domain\ViewManagement\ViewBuilderInterface::getActionService()
|
||||
*/
|
||||
public function getActionService(): ActionServiceInterface
|
||||
{
|
||||
return $this->actionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \App\Domain\ViewManagement\ViewBuilderInterface::build()
|
||||
*/
|
||||
public function build(): void
|
||||
{
|
||||
$this->view->create();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user