108 $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
109 $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
110 $this->comments = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
111 $this->relatedPosts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
112 $this->date = new \DateTime();
113 $this->additionalComments = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
192 public function addTag(Tag $tag)
194 $this->tags->attach($tag);
204 $this->tags->detach($tag);
212 $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
233 $this->categories->attach($category);
263 $this->categories->detach($category);
355 $this->comments->attach($comment);
365 $this->comments->detach($commentToDelete);
404 $this->relatedPosts->attach($post);
479 $this->additionalComments->attach($comment);
488 $this->additionalComments->removeAll(
$comments);
496 $this->additionalComments->detach($comment);
506 return $this->title . chr(10) .
507 ' written on ' . $this->date->format(
'Y-m-d') . chr(10) .
508 ' by ' . $this->author->getFullName() . chr(10) .
509 wordwrap($this->content, 70, chr(10)) . chr(10) .
510 implode(
', ', $this->tags->toArray());