Name
sn_uibtk_api.ControllerPreset
Description
No description available
Script
var ControllerPreset = Class.create();
ControllerPreset.prototype = Object.extendsObject(BuilderToolkitAPIBase, {
TABLE: 'sys_ux_controller_preset',
FIELDS: ['name', 'description', 'controller', 'connected_controller', 'properties', 'event_handlers', 'connected_controller_event_handlers', 'host_event_handlers'],
/**
* @param fields {string[]}
*/
initialize: function(fields) {
BuilderToolkitAPIBase.prototype.initialize.call(this, this.TABLE, fields || this.FIELDS);
},
/**
* @param presetArray {array} converts an array of presets into object by controller ID
*/
convertPresetDefinitions: function(presetArray) {
return presetArray.reduce(function(acc, preset) {
if (!acc[preset.controller]) {
acc[preset.controller] = [];
}
acc[preset.controller].push(preset);
return acc;
}, {});
},
type: 'ControllerPreset'
});
Sys ID
fcc24cd377702110ba5c177997106149