public function getTopicByFullNameAsArray($fullName)
{
$extractedData = $this->extractNameAndLanguage($fullName);
if (empty($extractedData)) {
return;
}
$name = $extractedData['name'];
$languageCode = $extractedData['locale'];
$topicTranslation = $this->em->getRepository('Newscoop\\NewscoopBundle\\Entity\\Topic')->getOneByExtractedFullName($name, $languageCode)->getArrayResult();
if (empty($topicTranslation)) {
return;
}
$topicTranslation[0]['object']['title'] = $topicTranslation[0]['title'];
return $topicTranslation[0]['object'];
}