private function normalizePeriods()
{
$this->io->newLine();
$this->io->text('normalizing periods');
$this->getContainer()->getParameter('locale');
$this->io->progressStart();
$periods = $this->em->getRepository('OjsJournalBundle:Period')->findAll();
foreach ($periods as $period) {
$getTranslation = $this->em->getRepository('OjsJournalBundle:PeriodTranslation')->findOneBy(['translatable' => $period, 'locale' => $this->locale]);
if (!$getTranslation) {
$this->io->progressAdvance();
$newPeriodTranslation = new PeriodTranslation();
$newPeriodTranslation->setTranslatable($period);
$newPeriodTranslation->setLocale($this->locale);
$newPeriodTranslation->setPeriod('-');
$this->em->persist($newPeriodTranslation);
}
}
$this->em->flush();
$this->io->newLine();
}