Sidebar

iTop Customization

"How to" examples
DataModel

User Interface

Automation & Ticket management

Portal Customization

:: Version 3.2.0 ::

๐Ÿ”™ 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

API synthesis

List of the public API methods. When manipulating iPopupMenuExtension, You can call those methods:

  • EnumItems() โ€” Get the list of items to be added to a menu.

Public methods

EnumItems

api 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

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

$param is a DBObject instance: the object currently displayed

Tags
api
Insert an item into the Actions menu of a list

$param is a DBObjectSet containing the list of objects

Tags
api
Insert an item into the Toolkit menu of a list

$param is a DBObjectSet containing the list of objects

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

$param is null

Tags
api

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)

Tags
api

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)

Tags
api

PORTAL_USER_ACTIONS

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

$param is the portal id

๐Ÿ”™ Back

3_2_0/customization/api/extensions/ipopupmenuextension.txt ยท Last modified: 2024/09/10 10:25 by 127.0.0.1
Back to top
Contact us