Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/vendor/magento/module-indexer/Console/Command/
Upload File :
Current File : //home/rtorresani/www/vendor/magento/module-indexer/Console/Command/IndexerInfoCommand.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Indexer\Console\Command;

use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

/**
 * Command for displaying information related to indexers.
 */
class IndexerInfoCommand extends AbstractIndexerCommand
{
    /**
     * @inheritdoc
     */
    protected function configure()
    {
        $this->setName('indexer:info')->setDescription('Shows allowed Indexers');
    }

    /**
     * @inheritdoc
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $indexers = $this->getAllIndexers();
        foreach ($indexers as $indexer) {
            $output->writeln(sprintf('%-40s %s', $indexer->getId(), $indexer->getTitle()));
        }

        return Cli::RETURN_SUCCESS;
    }
}