CommandManager.addHooks Member

Registers multiple hooks for commands.

Syntax

object.addHooks(hooks, prefix);

Arguments

ArgumentSummary
hooks An Object containing Function objects to call for each hook; the key of each item is the name of the command it wishes to hook. Optionally, the _before property can be added to a function to override the default before value of false.
prefix Optional. A String prefix to apply to each hook's command name to compute an id for it.

Returns

Remarks

See Also

Source Code

function cmgr_hooks (hooks, prefix)
{
if (!prefix)
prefix = "";
for (var h in hooks)
{
this.addHook(h, hooks[h], prefix + ":" + h,
("_before" in hooks[h]) ? hooks[h]._before : false);
}
}