In between commit solving tests for meta and template management

This commit is contained in:
Kevin Frantz
2019-01-06 13:13:24 +01:00
parent 6352e82ce1
commit 72d0a6ba95
11 changed files with 289 additions and 108 deletions

View File

@@ -4,9 +4,10 @@ namespace App\Domain\EntityManagement;
use App\Domain\TemplateManagement\TemplatePathFormAndViewInterface;
use App\Entity\EntityInterface;
use src\Domain\TemplateManagement\TemplatePathFormAndView;
use App\Domain\TemplateManagement\TemplatePathFormAndView;
use App\Domain\FormManagement\FormMetaInformationInterface;
use App\Domain\FormManagement\FormMetaInformation;
use App\Domain\PathManagement\NamespacePathMapInterface;
/**
* @author kevinfrantz
@@ -36,7 +37,7 @@ class EntityMetaInformation implements EntityMetaInformationInterface
/**
* @var string
*/
private $pureName;
protected $pureName;
/**
* @var EntityInterface
@@ -48,6 +49,16 @@ class EntityMetaInformation implements EntityMetaInformationInterface
*/
private $formMetaInformation;
/**
* @var string
*/
private $basicPathString;
/**
* @var NamespacePathMapInterface
*/
private $namespacePathMap;
/**
* @param EntityInterface $entity
*/
@@ -56,12 +67,18 @@ class EntityMetaInformation implements EntityMetaInformationInterface
$this->entity = $entity;
$this->entityReflection = new \ReflectionClass($entity);
$this->setBasicPathArray();
$this->setBasicPathString();
$this->setPureName();
$this->setInterfaceReflection();
$this->setTemplatePathFormAndView();
$this->formMetaInformation = new FormMetaInformation($this);
}
private function setBasicPathString(): void
{
$this->basicPathString = implode('/', $this->basicPathArray);
}
private function setTemplatePathFormAndView(): void
{
$this->templatePathFormAndView = new TemplatePathFormAndView(implode('/', $this->basicPathArray), $this->pureName);
@@ -158,4 +175,14 @@ class EntityMetaInformation implements EntityMetaInformationInterface
{
return $this->formMetaInformation;
}
/**
* {@inheritdoc}
*
* @see \App\Domain\EntityManagement\EntityMetaInformationInterface::getBasicPathString()
*/
public function getBasicPathString(): string
{
return $this->basicPathString;
}
}