Newscoop\Tools\Console\Command\AutopublishCommand::execute PHP Method

execute() protected method

See also: Console\Command\Command
protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
    {
        $issueActions = \IssuePublish::DoPendingActions();
        $articleActions = \ArticlePublish::DoPendingActions();
        if ($issueActions > 0 || $articleActions > 0) {
            fopen(realpath(APPLICATION_PATH . '/../') . '/reset_cache', 'w');
        }
        if ($input->getOption('verbose')) {
            $output->writeln('Published issues: <info>' . $issueActions . '</info>.');
            $output->writeln('Published articles: <info>' . $articleActions . '</info>.');
        }
    }
AutopublishCommand