define('application/widgets/menu/item', [
'application/widgets/pointerfocusablebutton'
], function (
Button
) {
'use strict';
return Button.extend({
init: function init () {
init.base.call(this);
this._menuItem = null;
},
/**
* Checks for a menu item.
*
* @returns {boolean} - Whether a menu item is set.
*/
hasMenuItem: function () {
return this._menuItem !== null;
},
/**
* Gets the set menu item.
*
* @returns {MenuItem} - The menu item.
*/
getMenuItem: function () {
return this._menuItem;
},
/**
* Sets the menu item.
*
* @param {MenuItem} menuItem - The menu item.
*/
setMenuItem: function (menuItem) {
this._menuItem = menuItem;
}
});
});