Merge "RCFilters: Move parameter operations to ViewModel"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / dm / mw.rcfilters.dm.SavedQueryItemModel.js
index c066a1f..a6ff9a1 100644 (file)
@@ -42,7 +42,7 @@
        /**
         * Get an object representing the state of this item
         *
-        * @returns {Object} Object representing the current data state
+        * @return {Object} Object representing the current data state
         *  of the object
         */
        mw.rcfilters.dm.SavedQueryItemModel.prototype.getState = function () {
                return this.data;
        };
 
+       /**
+        * Get the combined data of this item as a flat object of parameters
+        *
+        * @return {Object} Combined parameter data
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.getCombinedData = function () {
+               return $.extend( true, {}, this.data.params, this.data.highlights );
+       };
+
        /**
         * Check whether this item is the default
         *