22
November
you have to use following class
Drupal\Core\Url
You can use folowing code to get URL Alias
$options = ['absolute' => TRUE]; $url = \Drupal\Core\Url::fromRoute('entity.node.canonical', ['node' => $nid], $options); $nodeurl = $url->toString();
© 2023.ZedAngle. All Rights Reserved.