->
addOption('index', null, InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, 'The index to populate'
) ->
addOption('no-evaluation', null, InputOption::VALUE_NONE, 'Disable evaluation for each index'
) ->
addOption('stop-on-error', null, InputOption::VALUE_NONE, 'Abort indexing if an error occurs'
) ;
} /**
* {@inheritdoc}
*/
protected function execute(InputInterface
$input, OutputInterface
$output) { $helper =
new ConsoleProgressHelper($output);
$this->evaluationHelper->
setOutput($output);
$this->evaluationHelper->
setActive(!
$input->
getOption('no-evaluation'
));
$this->evaluationHelper->
setStopOnError($input->
getOption('stop-on-error'
));
foreach ($this->
getShops($input,
$output) as $shop) { $output->
writeln("\n## Indexing shop " .
$shop->
getName() . ' ##'
);
$this->shopIndexer->
index($shop,
$helper,
$input->
getOption('index'
));
} return 0;
}