You are here

public function ThemeHandler::uninstall in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Extension/ThemeHandler.php \Drupal\Core\Extension\ThemeHandler::uninstall()

Uninstalls a given list of themes.

Uninstalling a theme removes all related configuration (like blocks) and invokes the 'themes_uninstalled' hook.

Parameters

array $theme_list: The themes to uninstall.

Throws

\InvalidArgumentException Thrown when you uninstall an not installed theme.

Overrides ThemeHandlerInterface::uninstall

Deprecated

in Drupal 8.0.x-dev and will be removed before Drupal 9.0.0. Use the theme_installer service instead.

See also

hook_themes_uninstalled()

\Drupal\Core\Extension\ThemeInstallerInterface::uninstall

File

core/lib/Drupal/Core/Extension/ThemeHandler.php, line 172
Contains \Drupal\Core\Extension\ThemeHandler.

Class

ThemeHandler
Default theme handler using the config system to store installation statuses.

Namespace

Drupal\Core\Extension

Code

public function uninstall(array $theme_list) {

  // We keep the old uninstall() method as BC layer but redirect directly to
  // the theme installer.
  \Drupal::service('theme_installer')
    ->uninstall($theme_list);
}