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 |
EnumItems(int $iMenuId, mixed $param) : object[]
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.
int
The identifier of the type of menu, as listed by the constants MENU_xxx
mixed
Depends on $iMenuId, see the constants defined above
object[]
An array of ApplicationPopupMenuItem or an empty array if no action is to be added to the menuMENU_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
MENU_OBJDETAILS_ACTIONS
$param is a DBObject instance: the object currently displayed
MENU_OBJLIST_ACTIONS
$param is a DBObjectSet containing the list of objects
MENU_OBJLIST_TOOLKIT
$param is a DBObjectSet containing the list of objects
MENU_USER_ACTIONS
$param is null