Sulu\Bundle\ContentBundle\Command\WebspaceImportCommand::printExceptions PHP Метод

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

Print the completion message after import is done.
protected printExceptions ( Symfony\Component\Console\Output\OutputInterface $output, stdClass $import )
$output Symfony\Component\Console\Output\OutputInterface
$import stdClass
    protected function printExceptions($output, $import)
    {
        /** @var $logger LoggerInterface */
        $logger = $this->getContainer()->get('logger');
        if (null === $output) {
            $output = new NullOutput();
        }
        $output->writeln(['', '', '<info>Import Result</info>', '<info>===============</info>', '<info>' . $import->successes . ' Documents imported.</info>', '<comment>' . count($import->failed) . ' Documents ignored.</comment>']);
        if (!isset($import->exceptionStore['ignore'])) {
            return;
        }
        // If more than 20 exceptions write only into log.
        if (count($import->exceptionStore['ignore']) > 20) {
            foreach ($import->exceptionStore['ignore'] as $msg) {
                $logger->info($msg);
            }
            return;
        }
        foreach ($import->exceptionStore['ignore'] as $msg) {
            $output->writeln('<comment>' . $msg . '</comment>');
            $logger->info($msg);
        }
    }