Uninstall a theme.

@param string $theme
@return bool
6556
public function uninstall($theme)
    {
        /** @var Filesystem $filesystem */
        $filesystem = app(Filesystem::class);
        $dir        = $this->getDirectoryPath($theme);

        return $filesystem->deleteDirectory($dir);
    }
430857
public function delete($key)
    {
        if ($this->has($key)) {
            unset($this->values[$key]);

            return true;
        }

        return false;
    }
483034
public function removeItem($key)
    {
        if (!$this->getOptions()->getEnabled()) {
            return false;
        }

        $this->normalizeKey($key);

        $result = false;
        try {
            $result = $this->internalRemoveItem($key);
        } catch (\Exception $e) {
        }

        return $result;
    }
1354499
public function find($theme)
	{
		foreach ($this->paths as $path)
		{
			if (is_dir($path.$theme))
			{
				return $path.$theme.DS;
			}
		}

		return false;
	}
30520
public function setTheme(Theme $theme = null)
    {
        $theme_path = null;
        if ($theme) $theme_path = THEME_DIR.'/'.$theme->name;
        self::getDbConnection()->update('dir_data',array('templateDir'=>$theme_path),array('id'=>$this->id));
		$this->updateCache();
		return $this;
    }
333210
public function remove($host)
    {
        $this->validHost($host);

        if (!$this->check($host)) {
            throw new \RuntimeException('Host does not exists in the file');
        }

        $this->backup();

        $tmpFilePath = $this->filepath.'.tmp';

        $tmpFile = new \SplFileObject($tmpFilePath, 'w+');

        $this->file->rewind();

        while (!$this->file->eof()) {
            $pattern = '/\b'.$host.'\b/i';
            if (!preg_match($pattern, $this->file->current())) {
                $tmpFile->fwrite($this->file->current());
            }
            $this->file->next();
        }

        copy($tmpFilePath, $this->filepath);
        unlink($tmpFilePath);

        return true;
    }
224326
public static function theme($theme = null)
    {
        if (!self::$_initialized) {
            self::init();
        }

        if ($theme !== null) {
            if (!isset(self::$_themes[$theme])) {
                throw new Exception(__d('wasabi_cms', 'Theme "{0}" does not exist.', $theme));
            }
            self::$_theme = self::$_themes[$theme];
        }

        return self::$_theme;
    }
353570
public function delete($key)
    {
        if ($this->has($key)) {
            unset($this->collection[$key]);
            return true;
        }
        return false;
    }
537270
public function remove_setting( $setting ) {
		if ( ! $this->is_setting( $setting ) ) {
			return true;
		}

		$priority = $this->_setting_priority[ $setting ];
		unset( $this->_settings[ $priority ][ $setting ] );
		unset( $this->_setting_priority[ $setting ] );
		if ( empty( $this->_settings[ $priority ] ) ) {
			unset( $this->_settings[ $priority ] );
		}
		foreach ( $this->_groups as $group_priority => $groups ) {
			foreach ( $groups as $group => $settings ) {
				$key = array_search( $setting, $settings );
				if ( false !== $key ) {
					unset( $this->_groups[ $group_priority ][ $group ][ $key ] );
					if ( empty( $this->_groups[ $group_priority ][ $group ] ) ) {
						unset( $this->_groups[ $group_priority ][ $group ] );
						unset( $this->_group_priority[ $group ] );
						if ( empty( $this->_groups[ $group_priority ] ) ) {
							unset( $this->_groups[ $group_priority ] );
						}
					}
					break;
				}
			}
		}

		return true;
	}
739625
public function uninstall()
    {
        // 1. remove tables
        $migrator = new MysqlDbMigrator($this->sModuleAlias);
        $migrator->migrateTo(-1);

        // 2. remove row from the modules table
        Core::app()->deleteModuleById($this->sModuleAlias);

        // 3. Delete config
        $file = RX_PATH.'/ruxon/config/modules/'.$this->sModuleAlias.'.inc.php';
        if (file_exists($file)) {
            unlink($file);
        }

        return true;
    }
206890
public function setTheme($theme)
    {
        if (!is_null($this->theme)) {
            $this->resolved && $this->resetViewPaths();

            $this->dispatcher->fire("antares.theme.unset: {$this->theme}");
            $this->dispatcher->fire(new ThemeUnset($this->theme));
        }


        $this->theme = $theme;
        $this->dispatcher->fire("antares.theme.set: {$this->theme}");
        $this->dispatcher->fire(new ThemeSet($this->theme));

        if ($this->resolved) {
            $this->resolved = false;
            $this->resolving();
        }
    }
22821
public function remove($key)
    {
        if (array_key_exists($key, $this->settings)) {
            unset($this->settings[$key]);
            return true;
        }
        return false;
    }
1348994
public function remove($key)
    {
        foreach ($this->options as $idx => $option) {
            if (is_array($option)) {
                if (! strcasecmp($key, $option['name'])) {
                    unset($this->options[$idx]);

                    return true;
                }
            } elseif (! strcasecmp($key, $option)) {
                unset($this->options[$idx]);

                return true;
            }
        }

        return false;
    }
864295
public function delete($key): bool
    {
        if ($this->has($key)) {
            $this->unset($key);
            return true;
        }

        return false;
    }
802924
public function setDefault($theme) : Theme
    {
        if ($theme instanceof Theme) {
            $default = $theme;
        } elseif ($this->has($theme)) {
            $default = $this->get($theme);
        }

        if (!isset($default)) {
            throw new NullValueException("Cannot set default theme when theme does not exist");
        }

        if (!$default->verified()) {
            throw new \InvalidArgumentException("Cannot set default theme to an unverified theme");
        }

        return $this->default = $default;
    }
367424
public function deleteTheme($theme)
    {
        if (!$theme) {
            return false;
        }

        if (is_string($theme)) {
            $theme = CmsTheme::load($theme);
        }

        if ($theme->isActiveTheme()) {
            throw new ApplicationException(trans('cms::lang.theme.delete_active_theme_failed'));
        }

        /*
         * Delete from file system
         */
        $themePath = $theme->getPath();
        if (File::isDirectory($themePath)) {
            File::deleteDirectory($themePath);
        }

        /*
         * Set uninstalled
         */
        if ($themeCode = $this->findByDirName($theme->getDirName())) {
            $this->setUninstalled($themeCode);
        }
    }
619530
public function delete($key)
    {
        if ($this->has($key)) {
            unset($this->registry[$key]);
            return true;
        }
        return false;
    }