You are here

function _gatsby_get_path in Gatsby Live Preview & Incremental Builds 8

Same name and namespace in other branches
  1. 2.0.x gatsby.module \_gatsby_get_path()

Gets the correct path for an entity.

Deprecated

in gatsby:8.x-2.0 and is removed from gatsby:8.x-3.0. Use \Drupal\gatsby\PathMapping::getPath().

See also

https://www.drupal.org/node/3203580

File

./gatsby.module, line 267
Contains gatsby.module.

Code

function _gatsby_get_path(EntityInterface $node) {
  @trigger_error('_gatsby_get_path() is deprecated in gatsby:8.x-2.0 and is removed from gatsby:8.x-3.0. Use \\Drupal\\gatsby\\PathMapping::getPath(). See https://www.drupal.org/node/3203580', E_USER_DEPRECATED);
  return \Drupal::service('gatsby.path_mapping')
    ->getPath($node);
}