You are here

protected function LinkGeneratorTrait::l in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php \Drupal\Core\Routing\LinkGeneratorTrait::l()

Renders a link to a route given a route name and its parameters.

on the arguments, usage, and possible exceptions.

Return value

\Drupal\Core\GeneratedLink A GeneratedLink object containing a link to the given route and parameters and bubbleable metadata.

See also

\Drupal\Core\Utility\LinkGeneratorInterface::generate() for details

16 calls to LinkGeneratorTrait::l()
BookController::adminOverview in core/modules/book/src/Controller/BookController.php
Returns an administrative overview of all books.
BookController::bookRender in core/modules/book/src/Controller/BookController.php
Prints a listing of all books.
CommentForm::save in core/modules/comment/src/CommentForm.php
Form submission handler for the 'save' action.
ContentTranslationController::overview in core/modules/content_translation/src/Controller/ContentTranslationController.php
Builds the translations overview page.
DbLogController::eventDetails in core/modules/dblog/src/Controller/DbLogController.php
Displays details about a specific database log message.

... See full list

File

core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php, line 41
Contains \Drupal\Core\Routing\LinkGeneratorTrait.

Class

LinkGeneratorTrait
Wrapper methods for the Link Generator.

Namespace

Drupal\Core\Routing

Code

protected function l($text, Url $url) {
  return $this
    ->getLinkGenerator()
    ->generate($text, $url);
}