function Drupal::theme
Same name in other branches
- 9 core/lib/Drupal.php \Drupal::theme()
- 10 core/lib/Drupal.php \Drupal::theme()
- 11.x core/lib/Drupal.php \Drupal::theme()
Gets the theme service.
Return value
\Drupal\Core\Theme\ThemeManagerInterface
8 calls to Drupal::theme()
- RegistryLegacyTest::testMultipleSubThemes in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryLegacyTest.php - Tests the theme registry with theme functions and multiple subthemes.
- RegistryLegacyTest::testSuggestionPreprocessFunctions in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryLegacyTest.php - Tests the theme registry with theme functions with suggestions.
- RegistryTest::testMultipleSubThemes in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryTest.php - Tests the theme registry with multiple subthemes.
- RegistryTest::testSuggestionPreprocessFunctions in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryTest.php - Tests the theme registry with suggestions.
- RegistryTest::testThemeRegistryAlterByTheme in core/
tests/ Drupal/ KernelTests/ Core/ Theme/ RegistryTest.php - Tests that the theme registry can be altered by themes.
File
-
core/
lib/ Drupal.php, line 692
Class
- Drupal
- Static Service Container wrapper.
Code
public static function theme() {
return static::getContainer()->get('theme.manager');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.