You are here

protected function UrlGeneratorTrait::url in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php \Drupal\Core\Routing\UrlGeneratorTrait::url()

Generates a URL or path for a specific route based on the given parameters.

details on the arguments, usage, and possible exceptions.

Return value

string The generated URL for the given route.

See also

\Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for

39 calls to UrlGeneratorTrait::url()
AccountForm::form in core/modules/user/src/AccountForm.php
Gets the actual form array to be built.
AccountSettingsForm::buildForm in core/modules/user/src/AccountSettingsForm.php
Form constructor.
AggregatorController::adminOverview in core/modules/aggregator/src/Controller/AggregatorController.php
Displays the aggregator administration page.
BlockContentAddLocalAction::getOptions in core/modules/block_content/src/Plugin/Menu/LocalAction/BlockContentAddLocalAction.php
Returns options for rendering a link for the local action.
CommentForm::form in core/modules/comment/src/CommentForm.php
Gets the actual form array to be built.

... See full list

File

core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php, line 38
Contains \Drupal\Core\Routing\UrlGeneratorTrait.

Class

UrlGeneratorTrait
Wrapper methods for the Url Generator.

Namespace

Drupal\Core\Routing

Code

protected function url($route_name, $route_parameters = array(), $options = array()) {
  return $this
    ->getUrlGenerator()
    ->generateFromRoute($route_name, $route_parameters, $options);
}