Add command to console

This commit is contained in:
Romain Neutron
2013-06-11 18:39:22 +02:00
parent 341156f6d7
commit b0ede4bb11
2 changed files with 5 additions and 1 deletions

View File

@@ -20,6 +20,7 @@ use Alchemy\Phrasea\Core\Version;
use Alchemy\Phrasea\Command\BuildMissingSubdefs;
use Alchemy\Phrasea\Command\CreateCollection;
use Alchemy\Phrasea\Command\MailTest;
use Alchemy\Phrasea\Command\Compile\Configuration;
use Alchemy\Phrasea\Command\RecordAdd;
use Alchemy\Phrasea\Command\RescanTechnicalDatas;
use Alchemy\Phrasea\Command\UpgradeDBDatas;
@@ -92,6 +93,7 @@ try {
$app->command(new AddPlugin());
$app->command(new RemovePlugin());
$app->command(new Configuration());
$result_code = is_int($app->run()) ? : 1;
} catch (\Exception $e) {

View File

@@ -20,12 +20,14 @@ class Configuration extends Command
public function __construct()
{
parent::__construct('compile:configuration');
$this->setDescription('Compile configuration');
}
protected function doExecute(InputInterface $input, OutputInterface $output)
{
$this->container['phraseanet.configuration']->compileAndWrite();
$output->writeln("Confguration compiled.");
return 0;
}
}