function Router::generate
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::generate()
- 8.9.x core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::generate()
- 10 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::generate()
This method is intentionally not implemented.
Use Drupal\Core\Url instead.
Throws
\BadMethodCallException
See also
https://www.drupal.org/node/2820197
File
-
core/
lib/ Drupal/ Core/ Routing/ Router.php, line 322
Class
- Router
- Router implementation in Drupal.
Namespace
Drupal\Core\RoutingCode
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) : string {
throw new \BadMethodCallException(__METHOD__ . '() is not supported. Use the \\Drupal\\Core\\Url object instead. See https://www.drupal.org/node/2820197');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.