Ojs\CoreBundle\Command\SubmissionChecklistSamplesCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | null | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | null | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Creating sample submission checklists...');
        $allJournals = $this->getAllJournals();
        foreach ($allJournals as $journal) {
            if ($journal->getSubmissionChecklist()->count() > 0) {
                if (!$input->getOption('force')) {
                    $output->writeln('Submission checklists already exists');
                    continue;
                }
            }
            if ($input->getOption('force')) {
                $this->clearSubmissionChecklists($journal);
            }
            $output->writeln('Creating a checklist for ' . $journal->getTitle());
            $this->createItem1($journal, $output);
            $this->createItem2($journal, $output);
            $this->createItem3($journal, $output);
            $output->writeln('');
            $output->writeln('');
        }
    }