function ThemeHooks::themeRegistryAlter
Same name and namespace in other branches
- main core/themes/admin/src/Hook/ThemeHooks.php \Drupal\admin\Hook\ThemeHooks::themeRegistryAlter()
Implements hook_theme_registry_alter().
Attributes
#[Hook('theme_registry_alter')]
File
-
core/
themes/ admin/ src/ Hook/ ThemeHooks.php, line 242
Class
- ThemeHooks
- Provides theme related hook implementations.
Namespace
Drupal\admin\HookCode
public function themeRegistryAlter(array &$theme_registry) : void {
if (!empty($theme_registry['admin_block_content'])) {
$theme_registry['admin_block_content']['variables']['attributes'] = [];
}
// @todo Remove when https://www.drupal.org/node/3016346 is fixed.
if (!empty($theme_registry['text_format_wrapper'])) {
$theme_registry['text_format_wrapper']['variables']['disabled'] = FALSE;
}
foreach ([
'toolbar',
'menu__toolbar',
] as $registry_item) {
if (isset($theme_registry[$registry_item])) {
$theme_registry[$registry_item]['path'] = 'core/themes/admin/templates/navigation';
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.