You are here

function og_CrumbsMultiPlugin_groups_overview::findParent__node_x in Crumbs, the Breadcrumbs suite 7.2

Same name in this branch
  1. 7.2 plugins/crumbs.og.inc \og_CrumbsMultiPlugin_groups_overview::findParent__node_x()
  2. 7.2 plugins/crumbs.og.2.inc \og_CrumbsMultiPlugin_groups_overview::findParent__node_x()
Same name and namespace in other branches
  1. 7 plugins/crumbs.og.inc \og_CrumbsMultiPlugin_groups_overview::findParent__node_x()
  2. 7 plugins/crumbs.og.2.inc \og_CrumbsMultiPlugin_groups_overview::findParent__node_x()

Find a parent path for node/%, if that node is a group.

Parameters

string $path: The path that we want to find a parent for, e.g. "node/123".

array $item: Loaded router item, as returned from crumbs_get_router_item()

Return value

array|null Parent path candidates

File

plugins/crumbs.og.2.inc, line 164

Class

og_CrumbsMultiPlugin_groups_overview
Make $groups_overview_path the parent path for group nodes. The priorities can be configured per group node type.

Code

function findParent__node_x($path, $item) {
  if (FALSE === ($node = crumbs_Util::itemExtractEntity($item, 'node', 1))) {
    return NULL;
  }
  if (og_is_group('node', $node)) {
    return $this
      ->getGroupsOverviewPath($node);
  }
  return NULL;
}