From 8d69c49da595c60dae51c77d48f397ab97fdf318 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 20 May 2016 12:51:05 -0400 Subject: Manage plugins from the user interface and from the command line --- app/Console/PluginInstallCommand.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 app/Console/PluginInstallCommand.php (limited to 'app/Console/PluginInstallCommand.php') diff --git a/app/Console/PluginInstallCommand.php b/app/Console/PluginInstallCommand.php new file mode 100644 index 00000000..1c6e14b3 --- /dev/null +++ b/app/Console/PluginInstallCommand.php @@ -0,0 +1,35 @@ +setName('plugin:install') + ->setDescription('Install a plugin from a remote Zip archive') + ->addArgument('url', InputArgument::REQUIRED, 'Archive URL'); + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + if (!Installer::isConfigured()) { + $output->writeln('Kanboard is not configured to install plugins itself'); + } + + try { + $installer = new Installer($this->container); + $installer->install($input->getArgument('url')); + $output->writeln('Plugin installed successfully'); + } catch (PluginInstallerException $e) { + $output->writeln(''.$e->getMessage().''); + } + } +} -- cgit v1.2.3