Created
September 29, 2016 09:59
-
-
Save init90/7cc5b56dfe975f957724f19480afa602 to your computer and use it in GitHub Desktop.
Drupal 8, create absolute URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$route = \Drupal::service('current_route_match'); | |
$route_name = $route->getRouteName(); | |
$invoice_id = $route->getRawParameter('invoice'); | |
$invoice_url = \Drupal\Core\Url::fromRoute($route_name, ['invoice' => $invoice_id], ['absolute' => TRUE])->toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment