/**
* Adds topic to the article.
*
* @param Topic $topic Topic object
* @param Article $article Article object
*
* @return bool
*/
protected function attachTopicToArticle(Topic $topic, Article $article)
{
$result = $article->addTopic($topic);
if ($result) {
$this->em->flush();
$this->dispatcher->dispatch('article-topic.attach', new GenericEvent($this, $this->getLogArray($topic, $article)));
}
return $result;
}