public function RequestContext::fromRequest in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/symfony/routing/RequestContext.php \Symfony\Component\Routing\RequestContext::fromRequest()
- 8.0 core/lib/Drupal/Core/Routing/RequestContext.php \Drupal\Core\Routing\RequestContext::fromRequest()
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Routing/RequestContext.php \Drupal\Core\Routing\RequestContext::fromRequest()
Updates the RequestContext information based on a HttpFoundation Request.
Parameters
Request $request A Request instance:
Return value
RequestContext The current instance, implementing a fluent interface
Overrides RequestContext::fromRequest
1 call to RequestContext::fromRequest()
- RequestContext::fromRequestStack in core/
lib/ Drupal/ Core/ Routing/ RequestContext.php - Populates the context from the current request from the request stack.
File
- core/
lib/ Drupal/ Core/ Routing/ RequestContext.php, line 42 - Contains \Drupal\Core\Routing\RequestContext.
Class
- RequestContext
- Holds information about the current request.
Namespace
Drupal\Core\RoutingCode
public function fromRequest(Request $request) {
parent::fromRequest($request);
// @todo Extract the code in DrupalKernel::initializeRequestGlobals.
// See https://www.drupal.org/node/2404601
if (isset($GLOBALS['base_url'])) {
$this
->setCompleteBaseUrl($GLOBALS['base_url']);
}
}