public static function Drupal::theme in Drupal 8
Same name and namespace in other branches
- 9 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 - Contains \Drupal.
Class
- Drupal
- Static Service Container wrapper.
Code
public static function theme() {
return static::getContainer()
->get('theme.manager');
}