protected function crumbs_ParentFinder::_findParentPath in Crumbs, the Breadcrumbs suite 6.2
Same name and namespace in other branches
- 7.2 lib/ParentFinder.php \crumbs_ParentFinder::_findParentPath()
- 7 lib/ParentFinder.php \crumbs_ParentFinder::_findParentPath()
1 call to crumbs_ParentFinder::_findParentPath()
File
- ./
crumbs.trail.inc, line 157
Class
- crumbs_ParentFinder
- Can find a parent path for a given path. Contains a cache.
Code
protected function _findParentPath($path, &$item) {
if ($item) {
$invoke_action = new _crumbs_InvokeAction_findParent($path, $item);
$this->_pluginEngine
->invokeAll_find($invoke_action);
$parent_path = $invoke_action
->getValue();
$this->_log[$path] = $invoke_action
->getLoggedCandidates();
if (isset($parent_path)) {
$item['crumbs_candidate_key'] = $invoke_action
->getCandidateKey();
return $parent_path;
}
}
// fallback: chop off the last fragment of the system path.
$parent_path = crumbs_reduce_path($path);
return isset($parent_path) ? $parent_path : FALSE;
}