Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
IndexerShowModeCommand.php
Go to the documentation of this file.
1 <?php
7 
8 use Symfony\Component\Console\Input\InputInterface;
9 use Symfony\Component\Console\Output\OutputInterface;
10 
15 {
19  protected function configure()
20  {
21  $this->setName('indexer:show-mode')
22  ->setDescription('Shows Index Mode')
23  ->setDefinition($this->getInputList());
24 
25  parent::configure();
26  }
27 
31  protected function execute(InputInterface $input, OutputInterface $output)
32  {
33  $indexers = $this->getIndexers($input);
34  foreach ($indexers as $indexer) {
35  $status = $indexer->isScheduled() ? 'Update by Schedule' : 'Update on Save';
36  $output->writeln(sprintf('%-50s ', $indexer->getTitle() . ':') . $status);
37  }
38  }
39 }
execute(InputInterface $input, OutputInterface $output)
$status
Definition: order_status.php:8