function taxonomy_CrumbsMultiPlugin_termParent::describe in Crumbs, the Breadcrumbs suite 7
Same name and namespace in other branches
- 7.2 plugins/crumbs.taxonomy.inc \taxonomy_CrumbsMultiPlugin_termParent::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.taxonomy.inc, line 166
Class
Code
function describe($api) {
foreach (taxonomy_get_vocabularies() as $voc_id => $voc) {
$api
->addRule($voc->machine_name, 'Vocabulary: ' . $voc->name);
}
// Now set a generic title for the entire plugin.
$api
->addRule('*', t('Set taxonomy/term/123 as the parent for taxonomy/term/456, if 123 is the parent term of 456.'));
}