You are here

class _taxonomy_CrumbsPlugin__term_node in Crumbs, the Breadcrumbs suite 6

Same name and namespace in other branches
  1. 6.2 plugins/crumbs.taxonomy.inc \_taxonomy_CrumbsPlugin__term_node

Hierarchy

Expanded class hierarchy of _taxonomy_CrumbsPlugin__term_node

File

plugins/crumbs.taxonomy.inc, line 54

View source
class _taxonomy_CrumbsPlugin__term_node extends _taxonomy_CrumbsPlugin {

  /**
   * Nodes get their terms as breadcrumb parents.
   * The method name matches the router path "node/%".
   */
  function findParent__node__($path, $item) {
    $node = $item['map'][0];
    if (is_array($node->taxonomy)) {
      $result = array();
      foreach ($node->taxonomy as $tid => $term) {
        if (!isset($result['voc_' . $term->vid])) {
          $result['voc_' . $term->vid] = "taxonomy/term/{$tid}";
        }
      }
      return $result;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
_taxonomy_CrumbsPlugin::define function
_taxonomy_CrumbsPlugin__term_node::findParent__node__ function Nodes get their terms as breadcrumb parents. The method name matches the router path "node/%".