Merge remote-tracking branch 'origin/docgenerator_oct_nov_21' into features/docgen-widget-generate-template

This commit is contained in:
2021-11-30 18:31:33 +01:00
9 changed files with 178 additions and 30 deletions

View File

@@ -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
@@ -50,9 +51,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
@@ -61,6 +62,7 @@ class DocGeneratorTemplate
* @Serializer\Groups({"read"})
*/
private int $id;
/**
* @ORM\Column(type="json")
@@ -83,7 +85,7 @@ class DocGeneratorTemplate
return $this->entities;
}
public function getFile(): ?string
public function getFile(): ?StoredObject
{
return $this->file;
}
@@ -93,10 +95,11 @@ class DocGeneratorTemplate
return $this->id;
}
public function getName(): ?array
public function getName(): ?array
{
return $this->name;
}
public function setContext(string $context): self
{
@@ -119,7 +122,7 @@ class DocGeneratorTemplate
return $this;
}
public function setFile(string $file): self
public function setFile(StoredObject $file): self
{
$this->file = $file;