protected function Content::getRoute in JS Callback Handler 8.3
Retrieves the route object from a path.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The Request object to create route from.
Return value
\Symfony\Component\Routing\Route|null
1 call to Content::getRoute()
- Content::execute in src/
Plugin/ Js/ Content.php - Executes the callback.
File
- src/
Plugin/ Js/ Content.php, line 87
Class
- Content
- Plugin annotation @JsCallback( id = "js.content", allowed_methods = { "GET" }, csrf_token = FALSE, )
Namespace
Drupal\js\Plugin\JsCode
protected function getRoute(Request $request) {
return $this->currentRouteMatch
->getRouteMatchFromRequest($request)
->getRouteObject();
}