You are here

function og_CrumbsMultiPlugin_group_post::describe in Crumbs, the Breadcrumbs suite 7

Same name in this branch
  1. 7 plugins/crumbs.og.inc \og_CrumbsMultiPlugin_group_post::describe()
  2. 7 plugins/crumbs.og.2.inc \og_CrumbsMultiPlugin_group_post::describe()
Same name and namespace in other branches
  1. 7.2 plugins/crumbs.og.inc \og_CrumbsMultiPlugin_group_post::describe()
  2. 7.2 plugins/crumbs.og.2.inc \og_CrumbsMultiPlugin_group_post::describe()

Parameters

$api :crumbs_InjectedAPI_describeMultiPlugin: Injected API object, with methods that allow the plugin to further describe itself. The plugin is supposed to tell Crumbs about all possible rule keys, and can give a label and a description for each.

Return value

As an alternative to the API object's methods, the plugin can simply return a key-value array, where the keys are the available rules, and the values are their respective labels.

Overrides crumbs_MultiPlugin::describe

File

plugins/crumbs.og.inc, line 26

Class

og_CrumbsMultiPlugin_group_post
Use the group node as a parent for group posts. The priorities can be configured per group content type.

Code

function describe($api) {
  $types = node_type_get_types();
  foreach ($types as $type) {
    if (og_is_group_content_type('node', $type->type)) {
      $api
        ->addRule($type->type);
    }
  }
}