You are here

public static function Drupal::theme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \Drupal::theme()

Gets the theme service.

Return value

\Drupal\Core\Theme\ThemeManagerInterface

4 calls to Drupal::theme()
RegistryTest::testMultipleSubThemes in core/modules/system/src/Tests/Theme/RegistryTest.php
Tests the theme registry with multiple subthemes.
RegistryTest::testSuggestionPreprocessFunctions in core/modules/system/src/Tests/Theme/RegistryTest.php
Tests the theme registry with suggestions.
RegistryTest::testThemeRegistryAlterByTheme in core/modules/system/src/Tests/Theme/RegistryTest.php
Tests that the theme registry can be altered by themes.
StableTemplateOverrideTest::testStableTemplateOverrides in core/tests/Drupal/KernelTests/Core/Theme/StableTemplateOverrideTest.php
Ensures that Stable overrides all relevant core templates.

File

core/lib/Drupal.php, line 640
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function theme() {
  return static::getContainer()
    ->get('theme.manager');
}