Class: PluginManager

Constructor

PluginManager

new PluginManager()

Manager for all items registered with the workspace.

Class

Methods

addPlugin

addPlugin(pluginDataObject)

Adds a plugin.

Parameter

pluginDataObject

Blockly.PluginManager.PluginDatum

The plugin.

Value must not be null.

getPlugin

getPlugin(id) returns (Blockly.IPlugin or undefined)

Gets the plugin with the given id and the given type.

Parameter

id

string

The id of the plugin to get.

Returns

(non-null Blockly.IPlugin or undefined) The plugin with the given name or undefined if not found.

getPlugins

getPlugins(type, sorted) returns Array of T

Gets all the plugins of the specified type.

Parameter

type

Blockly.PluginManager.Type containing T

The type of the plugin.

Value must not be null.

sorted

boolean

Whether to return list ordered by weights.

Returns

non-null Array of T The plugins that match the specified type.

Abstract type

PluginDatum

static

{id: string, plugin: non-null Blockly.IPlugin, types: non-null Array of (string or non-null Blockly.PluginManager.Type containing Blockly.IPlugin), weight: number}

An object storing plugin information.