public function getTopicByFullName($fullName)
{
$extractedData = $this->extractNameAndLanguage($fullName);
if (empty($extractedData)) {
return;
}
$name = $extractedData['name'];
$languageCode = $extractedData['locale'];
$topicTranslation = $this->em->getRepository('Newscoop\\NewscoopBundle\\Entity\\TopicTranslation')->findOneBy(array('content' => $name, 'locale' => $languageCode, 'field' => 'title'));
if (!$topicTranslation) {
return;
}
return $topicTranslation->getObject();
}