You are here

class _forum_CrumbsPlugin__term_node in Crumbs, the Breadcrumbs suite 6

Same name and namespace in other branches
  1. 6.2 plugins/crumbs.forum.inc \_forum_CrumbsPlugin__term_node

Hierarchy

Expanded class hierarchy of _forum_CrumbsPlugin__term_node

File

plugins/crumbs.forum.inc, line 40

View source
class _forum_CrumbsPlugin__term_node {
  protected $_forum_vid;
  function __construct($forum_vid) {
    $this->_forum_vid = $forum_vid;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
_forum_CrumbsPlugin__term_node::$_forum_vid protected property
_forum_CrumbsPlugin__term_node::findParent__node__ function Forum nodes get their forum terms as breadcrumb parents. The method name matches the router path "node/%".
_forum_CrumbsPlugin__term_node::__construct function