isImportant = false; $this->children = new ArrayCollection(); } public function getId(): int { return $this->id; } public function getAuthor(): User { return $this->author; } public function setAuthor(User $author): PortfolioComment { $this->author = $author; return $this; } /** * @return \Chamilo\CoreBundle\Entity\Portfolio */ public function getItem(): Portfolio { return $this->item; } /** * @param \Chamilo\CoreBundle\Entity\Portfolio $item */ public function setItem(Portfolio $item): PortfolioComment { $this->item = $item; return $this; } public function getContent(): string { return $this->content; } public function setContent(string $content): PortfolioComment { $this->content = $content; return $this; } public function getDate(): DateTime { return $this->date; } public function setDate(DateTime $date): PortfolioComment { $this->date = $date; return $this; } /** * @return \Chamilo\CoreBundle\Entity\PortfolioComment|null */ public function getParent(): ?PortfolioComment { return $this->parent; } /** * @param \Chamilo\CoreBundle\Entity\PortfolioComment|null $parent */ public function setParent(?PortfolioComment $parent): PortfolioComment { $this->parent = $parent; return $this; } public function getChildren(): ArrayCollection { return $this->children; } public function setChildren(ArrayCollection $children): PortfolioComment { $this->children = $children; return $this; } public function isImportant(): bool { return $this->isImportant; } public function setIsImportant(bool $isImportant): void { $this->isImportant = $isImportant; } public function getExcerpt(int $count = 190): string { $excerpt = strip_tags($this->content); $excerpt = substr($excerpt, 0, $count); $excerpt = substr($excerpt, 0, strripos($excerpt, " ")); return $excerpt; } public function getScore(): ?float { return $this->score; } public function setScore(?float $score): void { $this->score = $score; } /** * @return \Chamilo\CoreBundle\Entity\PortfolioComment */ public function getRoot(): PortfolioComment { return $this->root; } public function getLvl(): int { return $this->lvl; } }