/** * Execute this command * @param array $arguments Array of commandline arguments */ public function execute(array $arguments) { if (!$this->interface->yesNo('Do you really want to irrevocably delete ' . $arguments[2] . ' "' . $arguments[3] . '"?')) { return; } $component = new \Cx\Core\Core\Model\Entity\ReflectionComponent($arguments[3], $arguments[2]); $component->remove(); $this->interface->show('Done'); }
/** * Execute this command * @param array $arguments Array of commandline arguments */ public function execute(array $arguments) { if (!$this->interface->yesNo('Removing workbench requires re-installing workbench to use it again. Are you sure?')) { return; } // Remove component from Db and FileSystem $component = new \Cx\Core\Core\Model\Entity\ReflectionComponent('Workbench', 'core_module'); $component->remove(); // Remove additional files (config, command line script) foreach ($this->interface->getWorkbench()->getFileList() as $file) { if (is_dir($file)) { \Cx\Lib\FileSystem\FileSystem::delete_folder(ASCMS_DOCUMENT_ROOT . $file, true); } else { \Cx\Lib\FileSystem\FileSystem::delete_file(ASCMS_DOCUMENT_ROOT . $file); } } $this->interface->show('Done'); }