function drupal_theme_rebuild in Drupal 9
Same name and namespace in other branches
- 8 core/includes/theme.inc \drupal_theme_rebuild()
- 7 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.
7 calls to drupal_theme_rebuild()
- ImageStyle::flush in core/
modules/ image/ src/ Entity/ ImageStyle.php - Flushes cached media for this style.
- ModuleInstaller::install in core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php - Installs a given list of modules.
- ModuleInstaller::uninstall in core/
lib/ Drupal/ Core/ Extension/ ModuleInstaller.php - Uninstalls a given list of modules.
- ThemeInstaller::themeRegistryRebuild in core/
lib/ Drupal/ Core/ Extension/ ThemeInstaller.php - Wraps drupal_theme_rebuild().
- ThemeTest::testPreprocessForSuggestions in core/
modules/ system/ tests/ src/ Functional/ Theme/ ThemeTest.php - Ensures preprocess functions run even for suggestion implementations.
File
- core/
includes/ theme.inc, line 122 - The theme system, which controls the output of Drupal.
Code
function drupal_theme_rebuild() {
\Drupal::service('theme.registry')
->reset();
}