class comment_CrumbsMonoPlugin_comment in Crumbs, the Breadcrumbs suite 7.2
Same name and namespace in other branches
- 7 plugins/crumbs.comment.inc \comment_CrumbsMonoPlugin_comment
Hierarchy
- class \comment_CrumbsMonoPlugin_comment implements crumbs_MonoPlugin
Expanded class hierarchy of comment_CrumbsMonoPlugin_comment
File
- plugins/
crumbs.comment.inc, line 39
View source
class comment_CrumbsMonoPlugin_comment implements crumbs_MonoPlugin {
/**
* {@inheritdoc}
*/
function describe($api) {
$api
->titleWithLabel(t("The comment's node"), t('Parent'));
}
/**
* Make node/% the parent for comment/%.
* This also completes the breadcrumb for other comment/%/* paths.
*
* @param string $path
* @param array $item
*
* @return string
*/
function findParent__comment_x($path, $item) {
$comment = comment_load($item['original_map'][1]);
if (!empty($comment->nid)) {
return 'node/' . $comment->nid;
}
return NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
comment_CrumbsMonoPlugin_comment:: |
function |
Overrides crumbs_MonoPlugin:: |
||
comment_CrumbsMonoPlugin_comment:: |
function | Make node/% the parent for comment/%. This also completes the breadcrumb for other comment/%/* paths. |