mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Add command to console
This commit is contained in:
@@ -20,6 +20,7 @@ use Alchemy\Phrasea\Core\Version;
|
|||||||
use Alchemy\Phrasea\Command\BuildMissingSubdefs;
|
use Alchemy\Phrasea\Command\BuildMissingSubdefs;
|
||||||
use Alchemy\Phrasea\Command\CreateCollection;
|
use Alchemy\Phrasea\Command\CreateCollection;
|
||||||
use Alchemy\Phrasea\Command\MailTest;
|
use Alchemy\Phrasea\Command\MailTest;
|
||||||
|
use Alchemy\Phrasea\Command\Compile\Configuration;
|
||||||
use Alchemy\Phrasea\Command\RecordAdd;
|
use Alchemy\Phrasea\Command\RecordAdd;
|
||||||
use Alchemy\Phrasea\Command\RescanTechnicalDatas;
|
use Alchemy\Phrasea\Command\RescanTechnicalDatas;
|
||||||
use Alchemy\Phrasea\Command\UpgradeDBDatas;
|
use Alchemy\Phrasea\Command\UpgradeDBDatas;
|
||||||
@@ -92,6 +93,7 @@ try {
|
|||||||
|
|
||||||
$app->command(new AddPlugin());
|
$app->command(new AddPlugin());
|
||||||
$app->command(new RemovePlugin());
|
$app->command(new RemovePlugin());
|
||||||
|
$app->command(new Configuration());
|
||||||
|
|
||||||
$result_code = is_int($app->run()) ? : 1;
|
$result_code = is_int($app->run()) ? : 1;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@@ -20,12 +20,14 @@ class Configuration extends Command
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct('compile:configuration');
|
parent::__construct('compile:configuration');
|
||||||
|
$this->setDescription('Compile configuration');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
$this->container['phraseanet.configuration']->compileAndWrite();
|
$this->container['phraseanet.configuration']->compileAndWrite();
|
||||||
|
$output->writeln("Confguration compiled.");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user