Page MenuHomeWickedGov Phorge

ext.uls.actions.menu.items.registry.js
No OneTemporary

Size
1019 B
Referenced Files
None
Subscribers
None

ext.uls.actions.menu.items.registry.js

( function () {
'use strict';
function ActionsMenuItemsRegistry() {
ActionsMenuItemsRegistry.super.apply( this, arguments );
}
OO.inheritClass( ActionsMenuItemsRegistry, OO.Registry );
ActionsMenuItemsRegistry.prototype.size = function () {
return Object.keys( this.registry ).length;
};
ActionsMenuItemsRegistry.prototype.getItems = function () {
var registry = this.registry;
return Object.keys( registry ).map( function ( key ) {
return registry[ key ];
} );
};
/**
* Register an action item with the factory.
* Actions items are required to include all necessary properties,
* i.e. name, icon, text and handler function.
*
* @param {{name: string, icon: string, text: string, handler: Function}} item
*/
ActionsMenuItemsRegistry.prototype.register = function ( item ) {
// Parent method
ActionsMenuItemsRegistry.super.prototype.register.call( this, item.name, item );
};
mw.uls = mw.uls || {};
mw.uls.ActionsMenuItemsRegistry = new ActionsMenuItemsRegistry();
}() );

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 3, 15:31 (7 h, 59 m ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
05/e3/8b319b193b68d5059018b245eb79
Default Alt Text
ext.uls.actions.menu.items.registry.js (1019 B)

Event Timeline