You are here

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

Same name and namespace in other branches
  1. 7 plugins/crumbs.forum.inc \forum_CrumbsMonoPlugin_forumThread::findParent__node_x()

Forum nodes get their forum terms as breadcrumb parents. The method name matches the router path "node/%".

Parameters

string $path:

array $item:

Return value

string|null

File

plugins/crumbs.forum.inc, line 119

Class

forum_CrumbsMonoPlugin_forumThread

Code

function findParent__node_x($path, $item) {
  $node = crumbs_Util::itemExtractEntity($item, 'node', 1);
  if (FALSE === $node || empty($node->forum_tid) || !_forum_node_check_node_type($node)) {
    return NULL;
  }
  return 'forum/' . $node->forum_tid;
}