function drupal_theme_rebuild
Same name in other branches
- 7.x includes/theme.inc \drupal_theme_rebuild()
- 9 core/includes/theme.inc \drupal_theme_rebuild()
- 8.9.x core/includes/theme.inc \drupal_theme_rebuild()
Forces the system to rebuild the theme registry.
This function should be called when modules are added to the system, or when a dynamic system needs to add more theme hooks.
Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use theme.registry service reset() method instead.
See also
https://www.drupal.org/node/3348853
1 call to drupal_theme_rebuild()
- RegistryTest::testLegacyThemeRegistryRebuild in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryTest.php - Tests deprecated drupal_theme_rebuild() function.
File
-
core/
includes/ theme.inc, line 134
Code
function drupal_theme_rebuild() {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use theme.registry service reset() method instead. See https://www.drupal.org/node/3348853', E_USER_DEPRECATED);
\Drupal::service('theme.registry')->reset();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.