public static function WeMegaMenuBuilder::routeExists in Drupal Mega Menu 8
Same name and namespace in other branches
- 8.x src/WeMegaMenuBuilder.php \Drupal\we_megamenu\WeMegaMenuBuilder::routeExists()
Check router exists.
Parameters
string $name as router name: Public static function routeExists string name.
Return value
int Public static function routeExists int.
1 call to WeMegaMenuBuilder::routeExists()
- template_preprocess_we_megamenu_ul in ./
we_megamenu.module - Prepare variables for we_megamenu_ul.
File
- src/
WeMegaMenuBuilder.php, line 222
Class
Namespace
Drupal\we_megamenuCode
public static function routeExists($name) {
$route_provider = Drupal::service('router.route_provider');
$route_provider = $route_provider
->getRoutesByNames([
$name,
]);
return count($route_provider);
}