protected function Content::getRequest in JS Callback Handler 8.3
Creates a Request object for the given path.
Parameters
string $path: The path to create request from. Must be internal.
Return value
\Symfony\Component\HttpFoundation\Request A request object.
2 calls to Content::getRequest()
- Content::access in src/
Plugin/ Js/ Content.php - Access callback.
- Content::execute in src/
Plugin/ Js/ Content.php - Executes the callback.
File
- src/
Plugin/ Js/ Content.php, line 73
Class
- Content
- Plugin annotation @JsCallback( id = "js.content", allowed_methods = { "GET" }, csrf_token = FALSE, )
Namespace
Drupal\js\Plugin\JsCode
protected function getRequest($path = '') {
$request = Request::create($path);
$this->router
->matchRequest($request);
return $request;
}