function hook_themes_uninstalled

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Render/theme.api.php \hook_themes_uninstalled()
  2. 8.9.x core/lib/Drupal/Core/Render/theme.api.php \hook_themes_uninstalled()
  3. 11.x core/lib/Drupal/Core/Render/theme.api.php \hook_themes_uninstalled()

Respond to themes being uninstalled.

Parameters

array $themes: Array containing the names of the themes being uninstalled.

See also

\Drupal\Core\Extension\ThemeInstallerInterface::uninstall()

Related topics

10 functions implement hook_themes_uninstalled()

Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.

BreakpointHooks::themesUninstalled in core/modules/breakpoint/src/Hook/BreakpointHooks.php
Implements hook_themes_uninstalled().
breakpoint_themes_uninstalled in core/modules/breakpoint/breakpoint.module
Implements hook_themes_uninstalled().
ConfigTranslationHooks::themesUninstalled in core/modules/config_translation/src/Hook/ConfigTranslationHooks.php
Implements hook_themes_uninstalled().
config_translation_themes_uninstalled in core/modules/config_translation/config_translation.module
Implements hook_themes_uninstalled().
HelpHooks::themesUninstalled in core/modules/help/src/Hook/HelpHooks.php
Implements hook_themes_uninstalled().

... See full list

1 invocation of hook_themes_uninstalled()
ThemeInstaller::uninstall in core/lib/Drupal/Core/Extension/ThemeInstaller.php
Uninstalls a given list of themes.

File

core/lib/Drupal/Core/Render/theme.api.php, line 790

Code

function hook_themes_uninstalled(array $themes) {
  // Remove some state entries depending on the theme.
  foreach ($themes as $theme) {
    \Drupal::state()->delete('example.' . $theme);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.