You are here

function _entityreference_CrumbsMultiPlugin_node::findParent__node_x in Crumbs, the Breadcrumbs suite 7

Match "node/%" router path

File

plugins/crumbs.entityreference.inc, line 73

Class

_entityreference_CrumbsMultiPlugin_node

Code

function findParent__node_x($path, $item) {
  $node = $item['map'][1];

  // Load the node if it hasn't been loaded due to a missing wildcard loader.
  $node = is_numeric($node) ? node_load($node) : $node;
  $parent_path = $this
    ->_findParentPath($node);
  if ($parent_path) {
    return array(
      $node->type => $parent_path,
    );
  }
}