public function UrlGenerator::supports
public UrlGenerator::supports($name)
Whether this generator supports the supplied $name.
This check does not need to look if the specific instance can be resolved to a route, only whether the router can generate routes from objects of this class.
Parameters
mixed $name The route "name" which may also be an object or anything:
Return value
bool
Overrides VersatileGeneratorInterface::supports
File
- core/lib/Drupal/Core/Routing/UrlGenerator.php, line 434
Class
- UrlGenerator
- Generates URLs from route names and parameters.
Namespace
Drupal\Core\RoutingCode
public function supports($name) { // Support a route object and any string as route name. return is_string($name) || $name instanceof SymfonyRoute; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!UrlGenerator.php/function/UrlGenerator::supports/8.1.x