W3cubDocs

/Drupal 8

function hook_themes_uninstalled

hook_themes_uninstalled(array $themes)

Respond to themes being uninstalled.

Parameters

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

See also

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

Related topics

Hooks
Define functions that alter the behavior of Drupal core.

File

core/lib/Drupal/Core/Render/theme.api.php, line 742
Hooks and documentation related to the theme and render system.

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_themes_uninstalled/8.1.x