mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 05:53:13 +00:00
plugin installation in docker
This commit is contained in:
29
docker/phraseanet/plugins/InitCommand.php
Normal file
29
docker/phraseanet/plugins/InitCommand.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Docker\Plugins\Command;
|
||||
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
class InitCommand extends Command
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('init')
|
||||
->setDescription('Initialize plugins');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
foreach (glob('./plugins/*') as $dir) {
|
||||
if (is_dir($dir)) {
|
||||
$output->writeln(sprintf('Init <info>%s</info> plugin', basename($dir)));
|
||||
SubCommand::run(sprintf('bin/setup plugin:add %s', $dir));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user