drupal 8 get node url by id code example Example: drupal 8 get url from node entity $entity->toUrl()->toString();