mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
126 lines
2.4 KiB
PHP
126 lines
2.4 KiB
PHP
<?php
|
|
|
|
namespace Chill\DocGeneratorBundle\Entity;
|
|
|
|
use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Component\Serializer\Annotation as Serializer;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="chill_docgen_template")
|
|
*/
|
|
class DocGeneratorTemplate
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
* @ORM\Column(type="integer")
|
|
* @Serializer\Groups({"read"})
|
|
*/
|
|
private int $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="json")
|
|
* @Serializer\Groups({"read"})
|
|
*/
|
|
private array $name = [];
|
|
|
|
/**
|
|
* @ORM\Column(type="text", nullable=true)
|
|
*/
|
|
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)
|
|
*/
|
|
private string $file;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getName(): ?array
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(array $name): self
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDescription(): ?string
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
public function setDescription(?string $description): self
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getFile(): ?string
|
|
{
|
|
return $this->file;
|
|
}
|
|
|
|
public function setFile(string $file): self
|
|
{
|
|
$this->file = $file;
|
|
|
|
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;
|
|
}
|
|
}
|