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