mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized MVC and implemented function tests for format
This commit is contained in:
@@ -44,8 +44,10 @@ final class MVCRoutineService implements MVCRoutineServiceInterface
|
||||
*/
|
||||
public function process(): View
|
||||
{
|
||||
$this->processService->process();
|
||||
$data = $this->processService->process();
|
||||
$view = $this->viewBuilder->getView();
|
||||
$view->setData($data);
|
||||
|
||||
return $this->viewBuilder->getView();
|
||||
return $view;
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ final class ProcessService implements ProcessServiceInterface
|
||||
*
|
||||
* @see \Infinito\Domain\ProcessManagement\ProcessServiceInterface::process()
|
||||
*/
|
||||
public function process(): void
|
||||
public function process()
|
||||
{
|
||||
if ($this->requestedActionService->hasRequestedEntity() && $this->requestedActionService->getRequestedEntity()->hasIdentity()) {
|
||||
// READ VIEW
|
||||
@@ -95,5 +95,7 @@ final class ProcessService implements ProcessServiceInterface
|
||||
->createView();
|
||||
$this->actionTemplateDataStore->setData(ActionType::CREATE, $updateForm);
|
||||
}
|
||||
|
||||
return $this->actionTemplateDataStore;
|
||||
}
|
||||
}
|
||||
|
@@ -7,5 +7,8 @@ namespace Infinito\Domain\ProcessManagement;
|
||||
*/
|
||||
interface ProcessServiceInterface
|
||||
{
|
||||
public function process(): void;
|
||||
/**
|
||||
* @todo specify return type
|
||||
*/
|
||||
public function process();
|
||||
}
|
||||
|
Reference in New Issue
Block a user