You are here

public static function Drupal::theme in Drupal 10

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

Gets the theme service.

Return value

\Drupal\Core\Theme\ThemeManagerInterface

39 calls to Drupal::theme()
AjaxTestController::theme in core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php
Returns the used theme.
AlterTest::testDrupalAlter in core/modules/system/tests/src/Functional/Common/AlterTest.php
Tests if the theme has been altered.
AssertContentTrait::assertThemeOutput in core/tests/Drupal/KernelTests/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().

... See full list

File

core/lib/Drupal.php, line 638

Class

Drupal
Static Service Container wrapper.

Code

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