Saved draft of marco for dto

This commit is contained in:
Kevin Frantz 2018-10-03 15:28:32 +02:00
parent 29b8414711
commit 74b45cb24d
4 changed files with 6 additions and 5 deletions

View File

@ -26,6 +26,8 @@ class SourceController extends FOSRestController
public function show(Request $request, int $id): Response public function show(Request $request, int $id): Response
{ {
$source = $this->loadSource($request, $id); $source = $this->loadSource($request, $id);
$assembler = $this->get(SourceDTOAssember::class);
$dto = $assembler->build($source, $this->getUser());
$view = $this->view($source, 200) $view = $this->view($source, 200)
->setTemplate((new SourceTemplateFactory($source, $request))->getTemplatePath()) ->setTemplate((new SourceTemplateFactory($source, $request))->getTemplatePath())
->setTemplateVar('source'); ->setTemplateVar('source');

View File

@ -25,7 +25,6 @@ class AndOperation extends AbstractOperation
foreach ($this->operands->toArray() as $operand) { foreach ($this->operands->toArray() as $operand) {
if (!$operand->getResult()->getBool()) { if (!$operand->getResult()->getBool()) {
$this->result->setAll(false); $this->result->setAll(false);
return; return;
} }
} }

View File

@ -2,8 +2,8 @@
namespace App\Structur\Facade\Security\Source; namespace App\Structur\Facade\Security\Source;
use App\Entity\NodeInterface; use App\Entity\Interfaces\NodeInterface;
use App\Entity\SourceInterface; use App\Entity\Interfaces\SourceInterface;
use App\Entity\User; use App\Entity\User;
use App\DBAL\Types\RightType; use App\DBAL\Types\RightType;
use App\DBAL\Types\LayerType; use App\DBAL\Types\LayerType;

View File

@ -2,9 +2,9 @@
namespace App\Structur\Facade\Security\Source; namespace App\Structur\Facade\Security\Source;
use App\Entity\NameSourceInterface; use App\Entity\Interfaces\NameSourceInterface;
use App\Entity\User; use App\Entity\User;
use App\Entity\UserSourceInterface; use App\Entity\Interfaces\UserSourceInterface;
use App\DBAL\Types\RightType; use App\DBAL\Types\RightType;
use App\DBAL\Types\LayerType; use App\DBAL\Types\LayerType;