public function getArticleTopicName($article) { $topics = $article->getTopicNames(); return empty($topics) ? null : array_shift($topics); }