8.3.x Drupal.php Drupal::theme()
8.0.x Drupal.php public static Drupal::theme()
8.1.x Drupal.php public static Drupal::theme()
8.2.x Drupal.php public static Drupal::theme()
8.4.x Drupal.php public static Drupal::theme()

Gets the theme service.

Return value

\Drupal\Core\Theme\ThemeManagerInterface

35 calls to Drupal::theme()
AlterTest::testDrupalAlter in core/modules/system/src/Tests/Common/AlterTest.php
Tests if the theme has been altered.
AssertContentTrait::assertThemeOutput in core/modules/simpletest/src/AssertContentTrait.php
Asserts themed output.
batch_process in core/includes/form.inc
Processes the batch.
block_page_top in core/modules/block/block.module
Implements hook_page_top().
color_block_view_pre_render in core/modules/color/color.module
#pre_render callback: Sets color preset logo.

... See full list

File

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

Class

Drupal
Static Service Container wrapper.

Code

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