class forum_CrumbsMonoPlugin_forumThread in Crumbs, the Breadcrumbs suite 7
Same name and namespace in other branches
- 7.2 plugins/crumbs.forum.inc \forum_CrumbsMonoPlugin_forumThread
Hierarchy
- class \forum_CrumbsMonoPlugin_forumThread implements crumbs_MonoPlugin
Expanded class hierarchy of forum_CrumbsMonoPlugin_forumThread
File
- plugins/
crumbs.forum.inc, line 85
View source
class forum_CrumbsMonoPlugin_forumThread implements crumbs_MonoPlugin {
function describe($api) {
return t('Let /forum/456 be the parent path of /node/789, if node 789 is a thread in this forum.');
}
/**
* Forum nodes get their forum terms as breadcrumb parents.
* The method name matches the router path "node/%".
*/
function findParent__node_x($path, $item) {
$node = $item['map'][1];
// Load the node if it hasn't been loaded due to a missing wildcard loader.
$node = is_numeric($node) ? node_load($node) : $node;
if (!empty($node->forum_tid) && _forum_node_check_node_type($node)) {
return 'forum/' . $node->forum_tid;
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
forum_CrumbsMonoPlugin_forumThread:: |
function |
Overrides crumbs_MonoPlugin:: |
||
forum_CrumbsMonoPlugin_forumThread:: |
function | Forum nodes get their forum terms as breadcrumb parents. The method name matches the router path "node/%". |