options = new ArrayCollection(); $this->medias = new ArrayCollection(); $this->commonFiles = new ArrayCollection(); $this->dedicatedFiles = new ArrayCollection(); } /** * @return int [description] */ public function getId(): ?int { return $this->id; } /** * @return string [description] */ public function getName(): ?string { return $this->name; } /** * @param string $name [description] * * @return self [description] */ public function setName(string $name): self { $this->name = $name; return $this; } /** * @return \DateTimeInterface [description] */ public function getRegeneratedAt(): ?\DateTimeInterface { return $this->regeneratedAt; } /** * @param \DateTimeInterface $regeneratedAt [description] * * @return self [description] */ public function setRegeneratedAt(\DateTimeInterface $regeneratedAt): self { $this->regeneratedAt = $regeneratedAt; return $this; } /** * @return int [description] */ public function getNbPage(): ?int { return $this->nbPage; } /** * @param int $nbPage [description] * * @return self [description] */ public function setNbPage(?int $nbPage): self { $this->nbPage = $nbPage; return $this; } /** * @return int [description] */ public function getNbElement(): ?int { return $this->nbElement; } /** * @param int $nbElement [description] * * @return self [description] */ public function setNbElement(?int $nbElement): self { $this->nbElement = $nbElement; return $this; } /** * @return string [description] */ public function getSuffix(): ?string { return $this->suffix; } /** * @param string $suffix [description] * * @return self [description] */ public function setSuffix(?string $suffix): self { $this->suffix = $suffix; return $this; } /** * @return string [description] */ public function getFontPath(): ?string { return $this->fontPath; } /** * @param string $fontPath [description] * * @return self [description] */ public function setFontPath(?string $fontPath): self { $this->fontPath = $fontPath; return $this; } /** * @return Collection|Option[] */ public function getOptions(): Collection { return $this->options; } /** * @param Option $option [description] * * @return self [description] */ public function addOption(Option $option): self { if (!$this->options->contains($option)) { $this->options[] = $option; $option->setTemplate($this); } return $this; } /** * @param Option $option [description] * * @return self [description] */ public function removeOption(Option $option): self { if ($this->options->contains($option)) { $this->options->removeElement($option); // set the owning side to null (unless already changed) if ($option->getTemplate() === $this) { $option->setTemplate(null); } } return $this; } /** * @return Collection|Media[] */ public function getMedias(): Collection { $criteriaObj = new Criteria(); $criteriaObj->where(Criteria::expr()->eq('deletedAt', null))->orderBy(["position" => Criteria::ASC]); return $this->medias->matching($criteriaObj); } /** * @param Media $media [description] * * @return self [description] */ public function addMedia(Media $media): self { if (!$this->medias->contains($media)) { $this->medias[] = $media; $media->setTemplate($this); } return $this; } /** * @param Media $media [description] * * @return self [description] */ public function removeMedia(Media $media): self { if ($this->medias->contains($media)) { $this->medias->removeElement($media); // set the owning side to null (unless already changed) if ($media->getTemplate() === $this) { $media->setTemplate(null); } } return $this; } /** * @return Twig [description] */ public function getTwig(): ?Twig { return $this->twig; } /** * @param Twig $twig [description] * * @return self [description] */ public function setTwig(Twig $twig): self { $this->twig = $twig; return $this; } /** * @return Collection|CommonFile[] */ public function getCommonFiles(): Collection { return $this->commonFiles; } /** * @param CommonFile $commonFile [description] * * @return self [description] */ public function addCommonFile(CommonFile $commonFile): self { if (!$this->commonFiles->contains($commonFile)) { $this->commonFiles[] = $commonFile; $commonFile->addTemplate($this); } return $this; } /** * @param CommonFile $commonFile [description] * * @return self [description] */ public function removeCommonFile(CommonFile $commonFile): self { if ($this->commonFiles->contains($commonFile)) { $this->commonFiles->removeElement($commonFile); $commonFile->removeTemplate($this); } return $this; } /** * @return Collection|DedicatedFile[] */ public function getDedicatedFiles(): Collection { return $this->dedicatedFiles; } /** * @param DedicatedFile $dedicatedFile [description] * * @return self [description] */ public function addDedicatedFile(DedicatedFile $dedicatedFile): self { if (!$this->dedicatedFiles->contains($dedicatedFile)) { $this->dedicatedFiles[] = $dedicatedFile; $dedicatedFile->setTemplate($this); } return $this; } /** * @param DedicatedFile $dedicatedFile [description] * * @return self [description] */ public function removeDedicatedFile(DedicatedFile $dedicatedFile): self { if ($this->dedicatedFiles->contains($dedicatedFile)) { $this->dedicatedFiles->removeElement($dedicatedFile); } return $this; } }