function config_pages_get_route_name_from_path in Config Pages 8
Same name and namespace in other branches
- 8.3 config_pages.module \config_pages_get_route_name_from_path()
- 8.2 config_pages.module \config_pages_get_route_name_from_path()
Parameters
string $path: Get route name from path.
Return value
mixed Route name or false.
1 call to config_pages_get_route_name_from_path()
File
- ./
config_pages.module, line 153 - Module hooks.
Code
function config_pages_get_route_name_from_path($path) {
$route = \Drupal::service('path.validator')
->getUrlIfValid($path);
return $route ? $route
->getRouteName() : FALSE;
}