Class for adding an item into a popup menu that triggers some Javascript code

package Extensibility
api
since 2.0

 Methods

Class for adding an item that triggers some Javascript code

__construct(string $sUID, string $sLabel, string $sJSCode, array $aIncludeJSFiles) 

Parameters

$sUID

string

The unique identifier of this menu in iTop... make sure you pass something unique enough

$sLabel

string

The display label of the menu (must be localized)

$sJSCode

string

In case the menu consists in executing some havascript code inside the page, pass it here. If supplied $sURL ans $sTarget will be ignored

$aIncludeJSFiles

array

An array of file URLs to be included (once) to provide some JS libraries for the page.