You are here

function crumbs_InjectedAPI_hookCrumbsPlugins::monoPlugin in Crumbs, the Breadcrumbs suite 7.2

Same name and namespace in other branches
  1. 7 lib/InjectedAPI/hookCrumbsPlugins.php \crumbs_InjectedAPI_hookCrumbsPlugins::monoPlugin()

Register a "Mono" plugin. That is, a plugin that defines exactly one rule.

Parameters

string $key: Rule key, relative to module name.

Crumbs_MonoPlugin $plugin: Plugin object. Needs to implement crumbs_MultiPlugin. Or NULL, to have the plugin object automatically created based on a class name guessed from the $key parameter and the module name.

Throws

Exception

File

lib/InjectedAPI/hookCrumbsPlugins.php, line 182

Class

crumbs_InjectedAPI_hookCrumbsPlugins
API object to be used as an argument for hook_crumbs_plugins() This is a sandbox class, currently not used..

Code

function monoPlugin($key = NULL, crumbs_MonoPlugin $plugin = NULL) {
  $this
    ->addPluginByType($plugin, $key, NULL, FALSE);
}