You are here

public static function Drupal::requestStack in Drupal 10

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

Retrieves the request stack.

Return value

\Symfony\Component\HttpFoundation\RequestStack The request stack

16 calls to Drupal::requestStack()
BigPipeTestController::test in core/modules/big_pipe/tests/modules/big_pipe_test/src/BigPipeTestController.php
Returns all BigPipe placeholder test case render arrays.
BookMultilingualTest::setCurrentLanguage in core/modules/book/tests/src/Kernel/BookMultilingualTest.php
Sets the current language.
DrupalTest::testRequestStack in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the testRequestStack() method.
MenuLinkContentCacheabilityBubblingTest::testOutboundPathAndRouteProcessing in core/modules/menu_link_content/tests/src/Kernel/MenuLinkContentCacheabilityBubblingTest.php
Tests bubbleable metadata of menu links' outbound route/path processing.
node_query_node_access_alter in core/modules/node/node.module
Implements hook_query_TAG_alter().

... See full list

File

core/lib/Drupal.php, line 266

Class

Drupal
Static Service Container wrapper.

Code

public static function requestStack() {
  return static::getContainer()
    ->get('request_stack');
}