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