From b0ede4bb118395658ddce1f5f54b7cce5a702191 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Tue, 11 Jun 2013 18:39:22 +0200 Subject: [PATCH] Add command to console --- bin/console | 2 ++ lib/Alchemy/Phrasea/Command/Compile/Configuration.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/console b/bin/console index 6f43d7fe98..15fbe40d52 100755 --- a/bin/console +++ b/bin/console @@ -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) { diff --git a/lib/Alchemy/Phrasea/Command/Compile/Configuration.php b/lib/Alchemy/Phrasea/Command/Compile/Configuration.php index ab907332b8..7b876944e1 100644 --- a/lib/Alchemy/Phrasea/Command/Compile/Configuration.php +++ b/lib/Alchemy/Phrasea/Command/Compile/Configuration.php @@ -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; } }