Merge reset and populate commands
This commit is contained in:
parent
65dbe74f32
commit
40827bb2a1
2 changed files with 4 additions and 37 deletions
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace FOQ\ElasticaBundle\Command;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Command\Command as BaseCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Output\Output;
|
||||
|
||||
class ResetCommand extends BaseCommand
|
||||
{
|
||||
/**
|
||||
* @see Command
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('foq:elastica:reset')
|
||||
->setDescription('Recreates all indexes');
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Command
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$output->writeLn('Reset all indexes');
|
||||
|
||||
$this->container->get('foq_elastica.reseter')->reset();
|
||||
|
||||
$output->writeln('Done');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue