public function getSelectedJournal($useCache = true)
{
$request = $this->requestStack->getCurrentRequest();
if (!$request) {
return false;
}
$journalId = $request->attributes->get('journalId');
if (!$journalId) {
return false;
}
/** @var Journal $selectedJournal */
$selectedJournal = $this->em->getRepository('OjsJournalBundle:Journal')->getById($journalId, $useCache);
if (!$selectedJournal) {
return false;
}
$this->em->getConfiguration()->setDefaultQueryHint('multiJournal', $selectedJournal->getId());
return $selectedJournal;
}