Remove a Topic from the Article.
public removeTopic ( |
||
$topic | the Topic to remove | |
Résultat | boolean |
/** * Removes topic from the article. * * @param Topic $topic Topic object * @param Article $article Article object * * @return bool */ protected function detachTopicFromArticle(Topic $topic, Article $article) { $result = $article->removeTopic($topic); if ($result) { $this->em->flush(); $this->dispatcher->dispatch('article-topic.detach', new GenericEvent($this, $this->getLogArray($topic, $article))); } return $result; }