You are here

public function Router::generate in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/Router.php \Drupal\Core\Routing\Router::generate()

File

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

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH) {
  @trigger_error('Use the \\Drupal\\Core\\Url object instead', E_USER_DEPRECATED);
  return $this->urlGenerator
    ->generate($name, $parameters, $referenceType);
}