You are here

function menu_CrumbsMultiPlugin_hierarchy::describe in Crumbs, the Breadcrumbs suite 7.2

Same name and namespace in other branches
  1. 7 plugins/crumbs.menu.inc \menu_CrumbsMultiPlugin_hierarchy::describe()

Parameters

crumbs_InjectedAPI_describeMultiPlugin $api: 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.menu.inc, line 43

Class

menu_CrumbsMultiPlugin_hierarchy

Code

function describe($api) {
  foreach (menu_get_menus() as $key => $title) {
    $api
      ->ruleWithLabel($key, $title, t('Menu'));
  }
  $api
    ->descWithLabel(t('The parent item\'s path'), t('Parent'));
}