public function configureOptions(OptionsResolver $resolver)
{
$journal = $this->journalService->getSelectedJournal(false);
if (!$journal instanceof Journal) {
return;
}
$journalLocaleBag = $journal->getLocaleCodeBag();
if (!in_array($journal->getMandatoryLang()->getCode(), $journalLocaleBag)) {
$journalLocaleBag[] = $journal->getMandatoryLang()->getCode();
}
$resolver->setDefaults(array('locales' => $journalLocaleBag, 'default_locale' => $journal->getMandatoryLang()->getCode(), 'required_locales' => [$journal->getMandatoryLang()->getCode()]));
}