Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Router.php

function Router::generate

Same name in this branch
  1. 11.1.x vendor/symfony/routing/Router.php \Symfony\Component\Routing\Router::generate()

This method is intentionally not implemented.

Use Drupal\Core\Url instead.

Throws

\BadMethodCallException

Overrides UrlGeneratorInterface::generate

See also

https://www.drupal.org/node/2820197

File

core/lib/Drupal/Core/Routing/Router.php, line 328

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

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');
}
RSS feed
Powered by Drupal