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

1
2
3
4
5
6
function hook_themes_uninstalled(array $themes) {
  // Remove some state entries depending on the theme.
  foreach ($themes as $theme) {
    \Drupal::state()->delete('example.' . $theme);
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.