function crumbs_MonoPlugin_ParentPathCallback::findParent in Crumbs, the Breadcrumbs suite 7.2
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
- lib/
MonoPlugin/ ParentPathCallback.php, line 51
Class
Code
function findParent($path, $item) {
if (!isset($this->callback)) {
// Restore the callback after serialization.
$this->callback = crumbs()->callbackRestoration
->restoreCallback($this->module, $this->key, 'routeParent');
}
if (!empty($this->callback)) {
return call_user_func($this->callback, $path, $item);
}
return NULL;
}