function RouteProvider::getRouteAliases

Same name in this branch
  1. 11.x core/tests/Drupal/KernelTests/RouteProvider.php \Drupal\KernelTests\RouteProvider::getRouteAliases()

Overrides RouteProviderInterface::getRouteAliases

File

core/lib/Drupal/Core/Routing/RouteProvider.php, line 546

Class

RouteProvider
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

public function getRouteAliases(string $route_name) : iterable {
    $alias_route_names = $this->connection
        ->select($this->tableName, 'router')
        ->fields('router', [
        'name',
    ])
        ->condition('alias', $route_name)
        ->execute()
        ->fetchCol();
    return $this->getRoutesByNames($alias_route_names);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.