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