RequestContext
class RequestContext extends RequestContext (View source)
Holds information about the current request.
Properties
| protected string | $completeBaseUrl | The scheme, host and base path, for example "http://example.com/d8". |
Methods
fromRequestStack(RequestStack $request_stack)
Populates the context from the current request from the request stack.
fromRequest(Request $request)
{@inheritdoc}
getCompleteBaseUrl()
Gets the scheme, host and base path.
setCompleteBaseUrl(string $complete_base_url)
Sets the complete base URL for the Request context.
Details
fromRequestStack(RequestStack $request_stack)
Populates the context from the current request from the request stack.
fromRequest(Request $request)
{@inheritdoc}
getCompleteBaseUrl()
Gets the scheme, host and base path.
For example, in an installation in a subdirectory "d8", it should be "https://example.com/d8".
setCompleteBaseUrl(string $complete_base_url)
Sets the complete base URL for the Request context.