define('application/formatters/editorials', [
'antie/formatter',
'antie/runtimecontext',
'application/widgets/editorialblock'
], function (
Formatter,
RuntimeContext,
Editorial
) {
'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 Editorial({
item: item,
title: item.getTitle(),
subtitle: item.getDescription(),
image: {
url: item.getImageUrl(formatParams.layout)
},
channelLogo: ''
});
}
});
});