Adding Admin Menus to your Module
* Fired when the module is registered and activated.
*/
function onLoad(){
// Let's add ourselves to the main menu in the Modules section
var menuService = controller.getWireBox().getInstance( "AdminMenuService@cb" );
// Add Menu Contribution
menuService.addSubMenu(topMenu=menuService.MODULES,name="mySecrets",label="my Secrets",href="#menuService.buildModuleLink('mySecrets','home')#" );
}* Fired when the module is unregistered and unloaded
*/
function onUnload(){
// Let's remove ourselves to the main menu in the Modules section
var menuService = controller.getWireBox().getInstance( "AdminMenuService@cb" );
// Remove Menu Contribution
menuService.removeSubMenu(topMenu=menuService.MODULES,name="mySecrets" );
}Last updated
Was this helpful?
