You are here

function crumbs_ParentFinder::getParentPath in Crumbs, the Breadcrumbs suite 7

Same name and namespace in other branches
  1. 6.2 crumbs.trail.inc \crumbs_ParentFinder::getParentPath()
  2. 7.2 lib/ParentFinder.php \crumbs_ParentFinder::getParentPath()

File

lib/ParentFinder.php, line 20

Class

crumbs_ParentFinder
Can find a parent path for a given path. Contains a cache.

Code

function getParentPath($path, &$item) {
  if (!isset($this->parents[$path])) {
    $parent_path = $this
      ->_findParentPath($path, $item);
    if (is_string($parent_path)) {
      $parent_path = drupal_get_normal_path($parent_path);
    }
    $this->parents[$path] = $parent_path;
  }
  return $this->parents[$path];
}