You are browsing the documentation for iTop 2.7 which is not the current version.

Consider browsing to iTop 3.1 documentation

๐Ÿ”™ Back

iPopupMenuExtension

api

New extension to add menu items in the "popup" menus inside iTop. Provides a greater flexibility thaniApplicationUIExtension::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

Tags

since 2.0

Public methods

EnumItems

public static

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

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.

public static EnumItems($iMenuId, $param)

Parameters

types name default description
integer $iMenuId The identifier of the type of menu, as listed by the constants MENU_xxx
mixed $param Depends on $iMenuId, see the constants defined above

Returns

array<mixed,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

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

$param is a DBObject instance: the object currently displayed

Insert an item into the Actions menu of a list

$param is a DBObjectSet containing the list of objects

Insert an item into the Toolkit menu of a list

$param is a DBObjectSet containing the list of objects

Insert an item into the User menu (upper right corner)

$param is null

PORTAL_MENU_ACTIONS

Insert an item into the navigation menu of the portalNote: This is not implemented yet !

$param is the portal id

PORTAL_OBJDETAILS_ACTIONS

Insert an item into the Action menu on an object details page in the portal

$param is an array('portal_id' => $sPortalId, 'object' => $oObject) containing the portal id and a DBObject instance (the object currently displayed)

PORTAL_OBJLIST_ACTIONS

Insert an item into the Actions menu of a list in the portalNote: This is not implemented yet !

$param is an array('portal_id' => $sPortalId, 'object_set' => $oSet) containing DBObjectSet containing the list of objects

PORTAL_OBJLISTITEM_ACTIONS

Insert an item into the Action menu on an object item in an objects list in the portal

$param is an array('portal_id' => $sPortalId, 'object' => $oObject) containing the portal id and a DBObject instance (the object on the current line)

PORTAL_USER_ACTIONS

Insert an item into the user menu of the portalNote: This is not implemented yet !

$param is the portal id

๐Ÿ”™ Back

2_7_0/customization/api/extensions/ipopupmenuextension.txt ยท Last modified: 2020/04/15 15:23 (external edit)
Back to top
Contact us