function crumbs_ParentFinder::getParentPath in Crumbs, the Breadcrumbs suite 7.2
Same name and namespace in other branches
- 6.2 crumbs.trail.inc \crumbs_ParentFinder::getParentPath()
- 7 lib/ParentFinder.php \crumbs_ParentFinder::getParentPath()
Parameters
string $path:
array|null &$item:
Return value
string
File
- lib/
ParentFinder.php, line 41
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 = $this->router
->getNormalPath($parent_path);
}
$this->parents[$path] = $parent_path;
}
return $this->parents[$path];
}