categories = new ArrayCollection(); $this->comments = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } public function getContent(): ?string { return $this->content; } public function setContent(?string $content): self { $this->content = $content; return $this; } public function getStatus(): ?int { return $this->status; } public function setStatus(int $status): self { $this->status = $status; return $this; } public function getImage() { if (is_string($this->image)) { if (file_exists($this->image)) { return new File($this->image); } return null; } return $this->image; } public function setImage(?string $image, bool $force = false): self { if (false === $force && null === $image) { return $this; } $this->image = $image; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(?string $slug): self { $this->slug = $slug; return $this; } public function getPublishedAt(): ?\DateTimeInterface { return $this->publishedAt; } public function setPublishedAt(?\DateTimeInterface $publishedAt): self { $this->publishedAt = $publishedAt; return $this; } public function getImageCaption(): ?string { return $this->imageCaption; } public function setImageCaption(?string $imageCaption): self { $this->imageCaption = $imageCaption; return $this; } /** * @return Collection|Category[] */ public function getCategories(): Collection { return $this->categories; } public function addCategory(Category $category): self { if (!$this->categories->contains($category)) { $this->categories[] = $category; } return $this; } public function removeCategory(Category $category): self { $this->categories->removeElement($category); return $this; } public function getContentFormat(): ?string { return $this->contentFormat; } public function setContentFormat(string $contentFormat): self { $this->contentFormat = $contentFormat; return $this; } public function getTags(): ?array { return $this->tags; } public function setTags(?array $tags): self { $this->tags = $tags; return $this; } public function getIsQuick(): ?bool { return $this->isQuick; } public function setIsQuick(bool $isQuick): self { $this->isQuick = $isQuick; return $this; } public function getQuickUrl(): ?string { return $this->quickUrl; } public function setQuickUrl(?string $quickUrl): self { $this->quickUrl = $quickUrl; return $this; } public function getQuickImage(): ?string { return $this->quickImage; } public function setQuickImage(?string $quickImage): self { $this->quickImage = $quickImage; return $this; } public function getQuickVideo(): ?string { return $this->quickVideo; } public function setQuickVideo(?string $quickVideo): self { $this->quickVideo = $quickVideo; return $this; } public function getQuickVideoWidth(): ?int { return $this->quickVideoWidth; } public function setQuickVideoWidth(?int $quickVideoWidth): self { $this->quickVideoWidth = $quickVideoWidth; return $this; } public function getQuickVideoHeight(): ?int { return $this->quickVideoHeight; } public function setQuickVideoHeight(?int $quickVideoHeight): self { $this->quickVideoHeight = $quickVideoHeight; return $this; } /** * @return Collection|Comment[] */ public function getComments(): Collection { return $this->comments; } public function addComment(Comment $comment): self { if (!$this->comments->contains($comment)) { $this->comments[] = $comment; $comment->setPost($this); } return $this; } public function removeComment(Comment $comment): self { if ($this->comments->removeElement($comment)) { // set the owning side to null (unless already changed) if ($comment->getPost() === $this) { $comment->setPost(null); } } return $this; } }