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
Fri, Jul 3, 19:25 (1 d, 1 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
dd/89/0a0d261bf1eece1ea18f1a2d389e
Default Alt Text
ext.uls.actions.menu.items.registry.js (1019 B)

Event Timeline