You are here

function forum_CrumbsMonoPlugin_forumTermName::findTitle__forum_x in Crumbs, the Breadcrumbs suite 7.2

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

Forums get their parent forums as breadcrumb parent. The method name matches the router path "forum/%". Forums are actually taxonomy terms, just the path is different.

Parameters

string $path:

array $item:

Return value

string|null

File

plugins/crumbs.forum.inc, line 85

Class

forum_CrumbsMonoPlugin_forumTermName

Code

function findTitle__forum_x($path, $item) {

  // Load the forum term, even if the wildcard loader has been replaced or
  // removed. This will use entity_load() and not forum_forum_load(), because
  // we don't need the forum stuff here.
  $term = crumbs_Util::itemExtractEntity($item, 'taxonomy_term', 1);
  if (FALSE === $term || empty($term->name)) {
    return NULL;
  }
  return $term->name;
}