Same name and namespace in other branches
  1. 8.9.x 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

17 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.
CommonTestController::attachments in core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php
Returns a response with early rendering in common_test_page_attachments.
DrupalTest::testRequestStack in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the testRequestStack() method.
EntityViewAlterTest::testContextualLinksRemoved in core/modules/layout_builder/tests/src/Kernel/EntityViewAlterTest.php
Tests that contextual links are removed when rendering Layout Builder.

... See full list

File

core/lib/Drupal.php, line 278

Class

Drupal
Static Service Container wrapper.

Code

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