CAdminContextMenu
object CAdminContextMenu( array $arMenu )
This class allows to create a Control Panel menu normally displayed above the main table (only for users who has permission for editing). Menu configuration is passed in a constructor parameter - an array whose elements are associated arrays containing the following keys:
Key | Description |
---|---|
TEXT | The menu item text. |
TITLE | The text of a menu item tooltip. |
LINK | The button link. |
LINK_PARAM | Additional parameters of the link (<A>) tag. |
ICON | The CSS class of an action icon . |
HTML | Explicitly sets the HTML code of a menu item. |
SEPARATOR | Specifies a separator (true/false). |
NEWBAR | Starts a new block of menu items (true/false). |
MENU | The key creates a drop-down submenu. The value is specified similarly
to the |
Example
// Let's build a menu containing only item: add maillist $aContext = array( array( "TEXT"=>GetMessage("POST_ADD"), "LINK"=>"rubric_edit.php?lang=".LANG, "TITLE"=>GetMessage("POST_ADD_TITLE"), "ICON"=>"btn_new", ), ); // and attach it to the list $oMenu = new CAdminContextMenu($aContext); $oMenu->Show();
© «Bitrix24», 2001-2024