Class: ToolFactory

.ui.ToolFactory()

new ToolFactory()

A ToolFactory creates tools on demand. All tools (Tools, PopupTools, and ToolGroupTools) must be registered with a tool factory. Tools are registered by their symbolic name. See toolbars for an example.

For more information about toolbars in general, please see the OOjs UI documentation on MediaWiki.

Source:

Extends

  • OO.Factory

Methods

getTools(includeopt, excludeopt, promoteopt, demoteopt) → {Array.<string>}

Get tools from the factory

Parameters:
Name Type Attributes Description
include Array | string <optional>

Included tools, see #extract for format

exclude Array | string <optional>

Excluded tools, see #extract for format

promote Array | string <optional>

Promoted tools, see #extract for format

demote Array | string <optional>

Demoted tools, see #extract for format

Source:
Returns:

List of tools

Type
Array.<string>