protected function execute(InputInterface $input, OutputInterface $output)
 {
     if (!Installer::isConfigured()) {
         $output->writeln('<error>Kanboard is not configured to install plugins itself</error>');
     }
     try {
         $installer = new Installer($this->container);
         $installer->install($input->getArgument('url'));
         $output->writeln('<info>Plugin installed successfully</info>');
     } catch (PluginInstallerException $e) {
         $output->writeln('<error>' . $e->getMessage() . '</error>');
     }
 }
Example #2
0
 /**
  * Install plugin from URL
  *
  * @throws \Kanboard\Core\Controller\AccessForbiddenException
  */
 public function install()
 {
     $this->checkCSRFParam();
     $pluginArchiveUrl = urldecode($this->request->getStringParam('archive_url'));
     try {
         $installer = new Installer($this->container);
         $installer->install($pluginArchiveUrl);
         $this->flash->success(t('Plugin installed successfully.'));
     } catch (PluginInstallerException $e) {
         $this->flash->failure($e->getMessage());
     }
     $this->response->redirect($this->helper->url->to('PluginController', 'show'));
 }