You are here

class comment_CrumbsMonoPlugin_comment in Crumbs, the Breadcrumbs suite 7

Same name and namespace in other branches
  1. 7.2 plugins/crumbs.comment.inc \comment_CrumbsMonoPlugin_comment

Hierarchy

Expanded class hierarchy of comment_CrumbsMonoPlugin_comment

File

plugins/crumbs.comment.inc, line 35

View source
class comment_CrumbsMonoPlugin_comment implements crumbs_MonoPlugin {

  /**
   * Describe this plugin for the configuration form.
   */
  function describe($api) {
    return t('Make node/% the parent for comment/%');
  }

  /**
   * Make node/% the parent for comment/%.
   * This also completes the breadcrumb for other comment/%/* paths.
   */
  function findParent__comment_x($path, $item) {
    $comment = comment_load($item['map'][1]);
    if ($comment && $comment->nid) {
      return 'node/' . $comment->nid;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
comment_CrumbsMonoPlugin_comment::describe function Describe this plugin for the configuration form. Overrides crumbs_MonoPlugin::describe
comment_CrumbsMonoPlugin_comment::findParent__comment_x function Make node/% the parent for comment/%. This also completes the breadcrumb for other comment/%/* paths.