private function getArticleTopicsIds($articleNumber) { $em = $this->get('em'); $query = $em->getRepository('Newscoop\\Entity\\ArticleTopic')->getArticleTopicsIds($articleNumber, true); $articleTopics = $query->getArrayResult(); $topicsIds = array(); foreach ($articleTopics as $articleTopic) { $topicsIds[] = reset($articleTopic); } return $topicsIds; }