define('application/formatters/heroslider', [
'antie/formatter',
'antie/runtimecontext',
'application/widgets/slideritem'
], function (
Formatter,
RuntimeContext,
SliderItem
) {
'use strict';
return Formatter.extend({
/**
* Formats the widget.
*
* @param {Object|Iterator} item - The slider model.
* @param {Object} formatParams - Formatter's configuration params.
* @returns {Object} - The formatted widget (slider item).
*/
format: function (item, formatParams) {
return new SliderItem({
item: item,
title: item.getSliderTitle(),
subtitle: item.getSliderSubtitle(),
image: {
url: item.getSliderImageUrl(formatParams.layout)
},
channelLogo: item.getChannelLogo()
});
}
});
});