function UrlGenerator::supports

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::supports()
  2. 10 core/lib/Drupal/Core/Routing/UrlGenerator.php \Drupal\Core\Routing\UrlGenerator::supports()

File

core/lib/Drupal/Core/Routing/UrlGenerator.php, line 440

Class

UrlGenerator
Generates URLs from route names and parameters.

Namespace

Drupal\Core\Routing

Code

public function supports($name) {
    // Support a route object and any string as route name.
    return is_string($name) || $name instanceof SymfonyRoute;
}

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