define('application/models/production/menu/action', [
'antie/class',
'rofl/lib/promise'
], function (
Class,
Promise
) {
'use strict';
return Class.extend({
/**
* Initalize data object, _route and _args.
*
* @param {Object} data - Data object.
*/
init: function (data) {
data = data || {};
this._route = data.route || null;
this._args = data.args || {};
},
/**
* The route the action will trigger.
*
* @returns {string} - The route to trigger.
*/
getRoute: function () {
return this._route;
},
/**
* The arguments passed along with the route.
*
* @returns {Object} - The arguments for the route.
*/
getArguments: function () {
return this._args;
},
/**
* Makes sure the routing is ready to perform.
*
* @returns {Promise} - The prepare promise.
*/
prepare: function () {
return Promise.resolve(this);
}
});
});