Last active
June 24, 2016 18:33
-
-
Save peterlozano/d95332a1486b374c1ed18f5aa5a255b7 to your computer and use it in GitHub Desktop.
Create absolute link to node in D8
This file contains 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
<?php | |
$url = \Drupal\Core\Url::fromRoute('entity.node.canonical', array('node' => $nid), array('absolute' => TRUE))->toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment