DrupalKernel::preHandle

public DrupalKernel::preHandle(Request $request)

Helper method that does request related initialization.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The current request.

Overrides DrupalKernelInterface::preHandle

File

core/lib/Drupal/Core/DrupalKernel.php, line 539

Class

DrupalKernel
The DrupalKernel class is the core of Drupal itself.

Namespace

Drupal\Core

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public function preHandle(Request $request) {
 
  $this->loadLegacyIncludes();
 
  // Load all enabled modules.
  $this->container->get('module_handler')->loadAll();
 
  // Register stream wrappers.
  $this->container->get('stream_wrapper_manager')->register();
 
  // Initialize legacy request globals.
  $this->initializeRequestGlobals($request);
 
  // Put the request on the stack.
  $this->container->get('request_stack')->push($request);
 
  // Set the allowed protocols.
  UrlHelper::setAllowedProtocols($this->container->getParameter('filter_protocols'));
 
  // Override of Symfony's MIME type guesser singleton.
  MimeTypeGuesser::registerWithSymfonyGuesser($this->container);
 
  $this->prepared = TRUE;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.