75 $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
76 $this->categories = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
77 $this->comments = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
78 $this->relatedPosts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
79 $this->date = new \DateTime();
157 $this->tags->attach($tag);
167 $this->tags->detach($tag);
176 $this->tags = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
195 $this->categories->attach($category);
222 $this->categories->detach($category);
280 $this->comments->attach($comment);
290 $this->comments->detach($commentToDelete);
329 $this->relatedPosts->attach($post);
357 return $this->title . chr(10) .
358 ' written on ' . $this->date->format(
'Y-m-d') . chr(10) .
359 ' by ' . $this->author->getFullName() . chr(10) .
360 wordwrap($this->content, 70, chr(10)) . chr(10) .
361 implode(
', ', $this->tags->toArray());
setAuthor(\ExtbaseTeam\BlogExample\Domain\Model\Person $author)
setBlog(\ExtbaseTeam\BlogExample\Domain\Model\Blog $blog)
setTags(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $tags)
removeComment(Comment $commentToDelete)
removeCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
addComment(Comment $comment)
addCategory(\TYPO3\CMS\Extbase\Domain\Model\Category $category)
setRelatedPosts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relatedPosts)
setCategories($categories)
setComments(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $comments)
addRelatedPost(Post $post)