/** * Add post * * @param Courtyard\Forum\Entity\Post $post * @return Topic */ public function addPost(PostInterface $post) { $post->setTopic($this); $this->posts[] = $post; $this->postLast = $post; return $this; }
public function add(PostInterface $post) { $this->posts[$post->getId()] = $post; }
/** * @param PostInterface $post */ public function preUpdate($post) { $post->setContent($this->getPoolFormatter()->transform($post->getContentFormatter(), $post->getRawContent())); }
/** * contains. * * @param PostInterface $item * * @return bool */ public function contains(PostInterface $item) { return in_array($item->getUniqueIdentifier(), array_keys($this->feedArray), true); }