Add site-biblio relation

This commit is contained in:
2024-11-28 09:40:50 +01:00
parent 78bd3ab85f
commit 5706cab551
3 changed files with 50 additions and 0 deletions

View File

@@ -86,8 +86,16 @@ class Site implements JsonSerializable
private ?ArrayCollection $images;
/**
* @var Document[] $documents
*/
private ?array $documents;
/**
* @var Bibliography[] $bibliography
*/
private ?array $bibliography;
public function getId(): ?int
{
return $this->id;
@@ -398,6 +406,18 @@ class Site implements JsonSerializable
return $this;
}
public function getBibliography(): ?array
{
return $this->bibliography;
}
public function setBibliography(array $bibliography): static
{
$this->bibliography = $bibliography;
return $this;
}
public function jsonSerialize(): array
{
return [
@@ -424,6 +444,7 @@ class Site implements JsonSerializable
'ownedBy' => $this->ownedBy,
'images' => $this->images->toArray(),
'documents' => $this->documents,
'bibliography' => $this->bibliography,
'techniques' => $this->techniques,
'author' => $this->author,
];