Adding context

This commit is contained in:
Marc Ducobu
2021-08-12 23:55:01 +02:00
parent 8df4c93c97
commit cbdf976885
5 changed files with 174 additions and 2 deletions

View File

@@ -29,6 +29,28 @@ class DocGeneratorTemplate
*/
private string $description;
/**
* @ORM\Column(type="simple_array")
*
* Class name of the entities for which this template can be used
*
* so if $entities = ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction']
* this template can be selected for an AccompanyingPeriod or a SocialAction
*/
private array $entities = [];
/**
* @ORM\Column(type="string", length=255)
*
* Class name of the context to use
*
* so if $context = ''
* this template will use '' as context
*/
private string $context;
/**
* @ORM\Column(type="string", length=255)
*/
@@ -74,4 +96,28 @@ class DocGeneratorTemplate
return $this;
}
public function getEntities(): ?array
{
return $this->entities;
}
public function setEntities(array $entities): self
{
$this->entities = $entities;
return $this;
}
public function getContext(): ?string
{
return $this->context;
}
public function setContext(string $context): self
{
$this->context = $context;
return $this;
}
}