You are here

function path_CrumbsMonoPlugin::findParent in Crumbs, the Breadcrumbs suite 7.2

Same name and namespace in other branches
  1. 7 plugins/crumbs.path.inc \path_CrumbsMonoPlugin::findParent()

Find candidates for the parent path.

Parameters

string $path: The path that we want to find a parent for.

array $item: Item as returned from crumbs_get_router_item()

Return value

string Parent path candidate.

Overrides crumbs_MonoPlugin_FindParentInterface::findParent

File

plugins/crumbs.path.inc, line 32

Class

path_CrumbsMonoPlugin
Implementation of class hook class_CrumbsParentFinder on the behalf of path module.

Code

function findParent($path, $item) {
  if ($alias = $item['alias']) {
    return crumbs_reduce_path($alias, 1);
  }
  return NULL;
}