visible = false; $this->postParentId = null; $this->attachments = new ArrayCollection(); } public function __toString(): string { return (string) $this->getPostTitle(); } /** * Set postTitle. * * @param string $postTitle * * @return CForumPost */ public function setPostTitle($postTitle) { $this->postTitle = $postTitle; return $this; } /** * Get postTitle. * * @return string */ public function getPostTitle() { return $this->postTitle; } public function setPostText(string $postText): self { $this->postText = $postText; return $this; } public function getPostText(): ?string { return $this->postText; } public function setThread(CForumThread $thread = null): self { $this->thread = $thread; return $this; } /** * Get thread. * * @return null|CForumThread */ public function getThread() { return $this->thread; } /** * Set postDate. * * @param DateTime $postDate * * @return CForumPost */ public function setPostDate($postDate) { $this->postDate = $postDate; return $this; } /** * Get postDate. * * @return DateTime */ public function getPostDate() { return $this->postDate; } /** * Set postNotification. * * @param bool $postNotification * * @return CForumPost */ public function setPostNotification($postNotification) { $this->postNotification = $postNotification; return $this; } /** * Get postNotification. * * @return bool */ public function getPostNotification() { return $this->postNotification; } /** * Set postParentId. * * @param int $postParentId * * @return CForumPost */ public function setPostParentId($postParentId) { $this->postParentId = $postParentId; return $this; } /** * Get postParentId. * * @return int */ public function getPostParentId() { return $this->postParentId; } /** * Set visible. * * @param bool $visible * * @return CForumPost */ public function setVisible($visible) { $this->visible = $visible; return $this; } /** * Get visible. * * @return bool */ public function getVisible() { return $this->visible; } /** * Set cId. * * @param int $cId * * @return CForumPost */ public function setCId($cId) { $this->cId = $cId; return $this; } /** * Get cId. * * @return int */ public function getCId() { return $this->cId; } /** * @return int */ public function getStatus() { return $this->status; } /** * @param int $status * * @return CForumPost */ public function setStatus($status) { $this->status = $status; return $this; } /** * Get iid. * * @return int */ public function getIid() { return $this->iid; } public function getAttachments(): Collection { return $this->attachments; } public function removeAttachment(CForumAttachment $attachment): void { $this->attachments->removeElement($attachment); } public function getForum(): ?CForumForum { return $this->forum; } public function setForum(?CForumForum $forum): self { $this->forum = $forum; return $this; } /** * @return User */ public function getUser() { return $this->user; } public function setUser(User $user): self { $this->user = $user; return $this; } public function getResourceIdentifier(): int { return $this->getIid(); } public function getResourceName(): string { return $this->getPostTitle(); } public function setResourceName(string $name): self { return $this->setPostTitle($name); } }