nl_tokens: Filters the objects in this collection by a set of { @link Ext . util . Filter Filter } s or by a single property / value pair with optional parameters for substring matching and case sensitivity . See { @link Ext . util . Filter Filter } for an example of using Filter objects ( preferred ) . Alternatively MixedCollection can be easily filtered by property like this :
pl_tokens: function ( property , value , anyMatch , caseSensitive ) { var filters = [ ] , filterFn ; //support for the simple case of filtering by property/value if ( Ext . isString ( property ) ) { filters . push ( Ext . create ( 'Ext.util.Filter' , { property : property , <mask> : value , anyMatch : anyMatch , caseSensitive : caseSensitive } ) ) ; } else if ( Ext . isArray ( property ) || property instanceof Ext . util . Filter ) { filters = filters . concat ( property ) ; } //at this point we have an array of zero or more Ext.util.Filter objects to filter with, //so here we construct a function that combines these filters by ANDing them together filterFn = function ( record ) { var isMatch = true , length = filters . length , i ; for ( i = 0 ; i < length ; i ++ ) { var filter = filters [ i ] , fn = filter . getFilterFn ( ) , scope = filter . getScope ( ) ; isMatch = isMatch && fn . call ( scope , record ) ; } return isMatch ; } ; return this . filterBy ( filterFn ) ; }