October 2017
Intermediate to advanced
566 pages
14h 31m
English
Now that we have a Url object, we can use it to generate a link. We can do this in two ways:
Let's take a look at an example of both, from start to finish.
Consider this example of generating a link using the service:
$url = Url::fromRoute('my_route', ['param_name' => $param_value]);$link = \Drupal::service('link_generator')->generate('My ...Read now
Unlock full access