New extension to add menu items in the "popup" menus inside iTop.

Provides a greater flexibility than iApplicationUIExtension::EnumAllowedActions.

To add some menus into iTop, declare a class that implements this interface, it will be called automatically by the application, as long as the class definition is included somewhere in the code

package Extensibility
api
since 2.0

 Methods

Get the list of items to be added to a menu.

EnumItems(int $iMenuId, mixed $param) : object[]
Static

This method is called by the framework for each menu. The items will be inserted in the menu in the order of the returned array.

Parameters

$iMenuId

int

The identifier of the type of menu, as listed by the constants MENU_xxx

$param

mixed

Depends on $iMenuId, see the constants defined above

Returns

object[]An array of ApplicationPopupMenuItem or an empty array if no action is to be added to the menu

 Constants

 

Insert an item into the Dashboard menu

MENU_DASHBOARD_ACTIONS 

The dashboad menu is shown on the top right corner when a dashboard is being displayed.

$param is a Dashboard instance: the dashboard currently displayed

 

Insert an item into the Actions menu on an object details page

MENU_OBJDETAILS_ACTIONS 

$param is a DBObject instance: the object currently displayed

 

Insert an item into the Actions menu of a list

MENU_OBJLIST_ACTIONS 

$param is a DBObjectSet containing the list of objects

 

Insert an item into the Toolkit menu of a list

MENU_OBJLIST_TOOLKIT 

$param is a DBObjectSet containing the list of objects