nl_tokens: Sorts the data in the Store by one or more of its properties . Example usage :
pl_tokens: function ( sorters , direction , where , doSort ) { var me = this , sorter , newSorters ; if ( Ext . isArray ( sorters ) ) { doSort = where ; where = direction ; newSorters = sorters ; } else if ( Ext . isObject ( sorters ) ) { doSort = where ; where = direction ; newSorters = [ sorters ] ; } else if ( Ext . isString ( sorters ) ) { sorter = me . sorters . get ( sorters ) ; if ( ! sorter ) { sorter = { property : sorters , direction : direction } ; newSorters = [ sorter ] ; } else if ( direction === undefined ) { sorter . toggle ( ) ; } else { sorter . setDirection ( direction ) ; } } if ( newSorters && newSorters . length ) { newSorters = me . decodeSorters ( newSorters ) ; if ( Ext . isString ( where ) ) { if ( where === 'prepend' ) { me . sorters . insert ( 0 , newSorters ) ; } else { me . sorters . addAll ( newSorters ) ; } } else { me . sorters . clear ( ) ; me . sorters . addAll ( newSorters ) ; } } if ( doSort !== false ) { me . fireEvent ( 'beforesort' , me , newSorters ) ; me . onBeforeSort ( newSorters ) ; sorters = <mask> . sorters . items ; if ( sorters . length ) { // Sort using a generated sorter function which combines all of the Sorters passed me . doSort ( me . generateComparator ( ) ) ; } } return sorters ; }