You are here

function drupal_theme_rebuild in Drupal 10

Same name and namespace in other branches
  1. 8 core/includes/theme.inc \drupal_theme_rebuild()
  2. 7 includes/theme.inc \drupal_theme_rebuild()
  3. 9 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.

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
ModuleInstaller::uninstall in core/lib/Drupal/Core/Extension/ModuleInstaller.php
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.

... See full list

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();
}