confirm('Are you sure you want to uninstall this plugin? [yes|no]')) { $pluginName = $this->argument('name'); $pluginName = PluginManager::instance()->normalizeIdentifier($pluginName); /* * Rollback plugin */ $manager = UpdateManager::instance()->resetNotes(); $manager->rollbackPlugin($pluginName); foreach ($manager->getNotes() as $note) $this->output->writeln($note); /* * Delete from file system */ if ($pluginPath = PluginManager::instance()->getPluginPath($pluginName)) { File::deleteDirectory($pluginPath); $this->output->writeln(sprintf('Deleted: %s', $pluginName)); } } } /** * Get the console command arguments. * @return array */ protected function getArguments() { return [ ['name', InputArgument::REQUIRED, 'The name of the plugin. Eg: AuthorName.PluginName'], ]; } /** * Get the console command options. * @return array */ protected function getOptions() { return []; } }