mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 22:35:01 +00:00
DocGeneratorTemplate use StoredObject for storign the template
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Chill\DocGeneratorBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
@@ -46,9 +47,9 @@ class DocGeneratorTemplate
|
||||
private array $entities = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @ORM\ManyToOne(targetEntity=StoredObject::class, cascade={"persist"}).)
|
||||
*/
|
||||
private string $file;
|
||||
private ?StoredObject $file = null;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
@@ -57,6 +58,7 @@ class DocGeneratorTemplate
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private int $id;
|
||||
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
@@ -79,7 +81,7 @@ class DocGeneratorTemplate
|
||||
return $this->entities;
|
||||
}
|
||||
|
||||
public function getFile(): ?string
|
||||
public function getFile(): ?StoredObject
|
||||
{
|
||||
return $this->file;
|
||||
}
|
||||
@@ -89,10 +91,11 @@ class DocGeneratorTemplate
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): ?array
|
||||
public function getName(): ?array
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
public function setContext(string $context): self
|
||||
{
|
||||
@@ -115,7 +118,7 @@ class DocGeneratorTemplate
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setFile(string $file): self
|
||||
public function setFile(StoredObject $file): self
|
||||
{
|
||||
$this->file = $file;
|
||||
|
||||
|
Reference in New Issue
Block a user