public function ExtraLinks::routeExists in Admin Toolbar 8.2
Same name and namespace in other branches
- 3.x admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php \Drupal\admin_toolbar_tools\Plugin\Derivative\ExtraLinks::routeExists()
Determine if a route exists by name.
Parameters
string $route_name: The name of the route to check.
Return value
bool Whether a route with that route name exists.
1 call to ExtraLinks::routeExists()
- ExtraLinks::getDerivativeDefinitions in admin_toolbar_tools/
src/ Plugin/ Derivative/ ExtraLinks.php - Gets the definition of all derivatives of a base plugin.
File
- admin_toolbar_tools/
src/ Plugin/ Derivative/ ExtraLinks.php, line 659
Class
- ExtraLinks
- Provides a default implementation for menu link plugins.
Namespace
Drupal\admin_toolbar_tools\Plugin\DerivativeCode
public function routeExists($route_name) {
return count($this->routeProvider
->getRoutesByNames([
$route_name,
])) === 1;
}