src/sap.ui.dt/src/sap/ui/dt/ContextMenuControl.js
function(oButtonItem, fnContextMenuHandler, aElementOverlays) {
			var fnHandler = function(oEvent) {
				this.bOpen = false;
				this.bOpenNew = false;
				fnContextMenuHandler(this);
			};

			var sText = typeof oButtonItem.text === "function" ? oButtonItem.text(aElementOverlays[0]) : oButtonItem.text;
			var bEnabled = typeof oButtonItem.enabled === "function" ? oButtonItem.enabled(aElementOverlays) : oButtonItem.enabled;
			var oButtonOptions = {
				icon: this._getIcon(oButtonItem.icon),
				text: sText,
				tooltip: sText,
				type: "Transparent",
				enabled: bEnabled,
				press: fnHandler,
				layoutData: new FlexItemData({})
			};
			return this._addButton(oButtonItem.id, oButtonOptions);
		}
function(oButtonItem, fnContextMenuHandler, aElementOverlays) {
			var fnHandler = function(oEvent) {
				this.bOpen = false;
				this.bOpenNew = false;
				fnContextMenuHandler(this);
			};

			var sText = typeof oButtonItem.text === "function" ? oButtonItem.text(aElementOverlays[0]) : oButtonItem.text;
			var bEnabled = typeof oButtonItem.enabled === "function" ? oButtonItem.enabled(aElementOverlays) : oButtonItem.enabled;
			var oButtonOptions = {
				icon: this._getIcon(oButtonItem.icon),
				text: sText,
				tooltip: sText,
				type: "Transparent",
				enabled: bEnabled,
				press: fnHandler,
				layoutData: new FlexItemData({})
			};
			return this._addButton(oButtonItem.id, oButtonOptions);
		}
function ( oButtonItem , fnContextMenuHandler , aElementOverlays ) { var fnHandler = function ( oEvent ) { this . bOpen = false ; this . bOpenNew = false ; fnContextMenuHandler ( this ) ; } ; var sText = typeof oButtonItem . text === "function" ? oButtonItem . text ( aElementOverlays [ 0 ] ) : oButtonItem . text ; var bEnabled = typeof oButtonItem . enabled === "function" ? oButtonItem . enabled ( aElementOverlays ) : oButtonItem . enabled ; var oButtonOptions = { icon : this . _getIcon ( oButtonItem . icon ) , text : sText , tooltip : sText , type : "Transparent" , enabled : bEnabled , press : fnHandler , layoutData : new FlexItemData ( { } ) } ; return this . _addButton ( oButtonItem . id , oButtonOptions ) ; }
Adds a menu action button to the contextMenu
@param {Object} oButtonItem the button configuration item
@param {function} fnContextMenuHandler the handler function for button press event
@param {sap.ui.dt.ElementOverlay[]} aElementOverlays - Target overlays
@return {sap.m.ContextMenu} Reference to this in order to allow method chaining
@public
Adds a menu action button to the contextMenu