Ojs\JournalBundle\Command\JournalAnnouncementNormalizeCommand::execute PHP Метод

execute() защищенный Метод

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
Результат void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->io->title($this->getDescription());
        $this->io->progressStart(count($this->getAnnouncements()));
        $counter = 1;
        foreach ($this->getAnnouncements() as $announcement) {
            if (!$this->haveTranslation($announcement['id'])) {
                $this->addTranslation($announcement);
                $this->io->progressAdvance(1);
                $counter = $counter + 1;
                if ($counter % 50 == 0) {
                    $this->em->flush();
                }
            }
        }
        $this->em->flush();
        $this->io->success('All process finished');
    }