Class StoreMgr

Index

Properties

Methods

Properties

public static all: Array<any>

[Property] (Array)

public static currentSortFn: any

[Property] (Object)

public static dirtyFilterFn: boolean

[Property] (Boolean)

public static dirtySortFn: boolean

[Property] (Boolean)

public static filtered: boolean

[Property] (Boolean)

public static indices: any

[Property] (Object)

public static items: Array<any>

[Property] (Array)

public static keys: Array<any>

[Property] (Array)

public static length: number

[Property] (Number)

public static map: any

[Property] (Object)

public static self: IClass

[Property] (Ext.Class)

public static sorted: boolean

[Property] (Boolean)

Methods

public static add(key?: string, item?: any): any

[Method] Adds an item to the collection

Parameters

  • key?: string optional

    String The key to associate with the item, or the new item. If a getKey implementation was specified for this MixedCollection, or if the key of the stored items is in a property called id, the MixedCollection will be able to derive the key for the new item. In this case just pass the new item in this parameter.

  • item?: any optional

    Object The item to add.

Returns

any

Object The item added.

public static addAll(addItems?: any)

[Method] Adds all elements of an Array or an Object to the collection

Parameters

  • addItems?: any optional

    Object/Array An Object containing properties which will be added to the collection, or an Array of values, each of which are added to the collection. Functions references will be added to the collection if {@link} Ext.util.MixedCollection.allowFunctions allowFunctions} has been set to true.

public static addFilter(filter?: any)

[Method] This method adds a filter

Parameters

  • filter?: any optional

    Ext.util.Sorter/Function/Object Can be an instance of Ext.util.Filter, an object representing an Ext.util.Filter configuration, or a filter function.

public static addFilters(filters?: any): any

[Method] This method adds all the filters in a passed array

Parameters

  • filters?: any optional

    Object

Returns

any

Object

public static addSorter(sorter?: any, defaultDirection?: string)

[Method] This method adds a sorter

Parameters

  • sorter?: any optional

    Ext.util.Sorter/String/Function/Object Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

public static addSorters(sorters?: Array<any>, defaultDirection?: string)

[Method] This method adds all the sorters in a passed array

Parameters

  • sorters?: Array<any> optional

    Array An array with sorters. A sorter can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

public static callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

public static callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

public static callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

public static clear()

[Method] Removes all items from the collection

public static clone(): IMixedCollection

[Method] Creates a shallow copy of this collection

Returns

IMixedCollection

Ext.util.MixedCollection

public static contains(item?: any): boolean

[Method] Returns true if the collection contains the passed Object as an item

Parameters

  • item?: any optional

    Object The Object to look for in the collection.

Returns

boolean

Boolean true if the collection contains the Object as an item.

public static containsKey(key?: string): boolean

[Method] Returns true if the collection contains the passed Object as a key

Parameters

  • key?: string optional

    String The key to look for in the collection.

Returns

boolean

Boolean true if the collection contains the Object as a key.

public static destroy()

[Method]

public static each(fn?: any, scope?: any)

[Method] Executes the specified function once for every item in the collection

Parameters

  • fn?: any optional

    Function The function to execute for each item.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. Defaults to the current item in the iteration.

public static eachKey(fn?: any, scope?: any)

[Method] Executes the specified function once for every key in the collection passing each key and its associated item as th

Parameters

  • fn?: any optional

    Function The function to execute for each item.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. Defaults to the browser window.

public static filter(property?: any, value?: any, anyMatch?: any, caseSensitive?: any): Array<any>

[Method] This method will sort a collection based on the currently configured sorters

Parameters

  • property?: any optional

    Object

  • value?: any optional

    Object

  • anyMatch?: any optional

    Object

  • caseSensitive?: any optional

    Object

Returns

Array<any>

Array

public static filterBy(fn?: any, scope?: any): IMixedCollection

[Method] Filter by a function

Parameters

  • fn?: any optional

    Function The function to be called.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. Defaults to this MixedCollection.

Returns

IMixedCollection

Ext.util.MixedCollection The new filtered collection

public static findBy(fn?: any, scope?: any): any

[Method] Returns the first item in the collection which elicits a true return value from the passed selection function

Parameters

  • fn?: any optional

    Function The selection function to execute for each item.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. Defaults to the browser window.

Returns

any

Object The first item in the collection which returned true from the selection function.

public static findIndexBy(fn?: any, scope?: any, start?: number): number

[Method] Find the index of the first matching object in this collection by a function

Parameters

  • fn?: any optional

    Function The function to be called.

  • scope?: any optional

    Object The scope (this reference) in which the function is executed. Defaults to this MixedCollection.

  • start?: number optional

    Number The index to start searching at.

Returns

number

Number The matched index, or -1 if the item was not found.

public static findInsertionIndex(items?: Array<any>, item?: any): number

[Method] This method returns the index that a given item would be inserted into a given array based on the current sorters

Parameters

  • items?: Array<any> optional

    Array The array that you want to insert the item into.

  • item?: any optional

    Mixed The item that you want to insert into the items array.

Returns

number

Number The index for the given item in the given array based on the current sorters.

public static first(): any

[Method] Returns the first item in the collection

Returns

any

Object the first item in the collection.

public static get(key?: any): any

[Method] Returns the item associated with the passed key OR index

Parameters

  • key?: any optional

    String/Number The key or index of the item.

Returns

any

Object If the item is found, returns the item. If the item was not found, returns undefined. If an item was found, but is a Class, returns null.

public static getAt(index?: number): any

[Method] Returns the item at the specified index

Parameters

  • index?: number optional

    Number The index of the item.

Returns

any

Object The item at the specified index.

public static getAutoFilter(): boolean

[Method] Returns the value of autoFilter

Returns

boolean

Boolean

public static getAutoSort(): boolean

[Method] Returns the value of autoSort

Returns

boolean

Boolean

public static getByKey(key?: any): any

[Method] Returns the item associated with the passed key

Parameters

  • key?: any optional

    String/Number The key of the item.

Returns

any

Object The item associated with the passed key.

public static getCount(): number

[Method] Returns the number of items in the collection

Returns

number

Number the number of items in the collection.

public static getDefaultSortDirection(): string

[Method] Returns the value of defaultSortDirection

Returns

string

String

public static getFilterFn(): any

[Method] Returns an up to date sort function

Returns

any

Function sortFn The sort function.

public static getFilterRoot(): string

[Method] Returns the value of filterRoot

Returns

string

String

public static getFilters(): Array<any>

[Method] Returns the value of filters

Returns

Array<any>

Array

public static getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

public static getKey(o?: any): any

[Method] getKey implementation for MixedCollection

Parameters

  • o?: any optional

    Object

Returns

any

Object The key for the passed item.

public static getRange(start?: number, end?: number): Array<any>

[Method] Returns a range of items in this collection

Parameters

  • start?: number optional

    Number The starting index.

  • end?: number optional

    Number The ending index. Defaults to the last item.

Returns

Array<any>

Array An array of items.

public static getSortFn(): any

[Method] Returns an up to date sort function

Returns

any

Function The sort function.

public static getSortRoot(): string

[Method] Returns the value of sortRoot

Returns

string

String

public static getSorters(): Array<any>

[Method] Returns the value of sorters

Returns

Array<any>

Array

public static indexOf(item?: any): number

[Method] Returns index within the collection of the passed Object

Parameters

  • item?: any optional

    Object The item to find the index of.

Returns

number

Number Index of the item. Returns -1 if not found.

public static indexOfKey(key?: string): number

[Method] Returns index within the collection of the passed key

Parameters

  • key?: string optional

    String The key to find the index of.

Returns

number

Number Index of the key.

public static initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

public static insert(index?: number, key?: string, item?: any): any

[Method] Inserts an item at the specified index in the collection

Parameters

  • index?: number optional

    Number The index to insert the item at.

  • key?: string optional

    String The key to associate with the new item, or the item itself.

  • item?: any optional

    Object If the second parameter was a key, the new item.

Returns

any

Object The item inserted.

public static insertFilter(index?: number, filter?: any): any

[Method] This method adds a filter at a given index

Parameters

  • index?: number optional

    Number The index at which to insert the filter.

  • filter?: any optional

    Ext.util.Sorter/Function/Object Can be an instance of Ext.util.Filter, an object representing an Ext.util.Filter configuration, or a filter function.

Returns

any

Object

public static insertFilters(index?: number, filters?: Array<any>): Array<any>

[Method] This method inserts all the filters in the passed array at the given index

Parameters

  • index?: number optional

    Number The index at which to insert the filters.

  • filters?: Array<any> optional

    Array Each filter can be an instance of Ext.util.Filter, an object representing an Ext.util.Filter configuration, or a filter function.

Returns

Array<any>

Array

public static insertSorter(index?: number, sorter?: any, defaultDirection?: string)

[Method] This method adds a sorter at a given index

Parameters

  • index?: number optional

    Number The index at which to insert the sorter.

  • sorter?: any optional

    Ext.util.Sorter/String/Function/Object Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

  • defaultDirection?: string optional

    String The default direction for each sorter in the array. Defaults to the value of defaultSortDirection. Can be either 'ASC' or 'DESC'.

public static insertSorters(): ICollection

[Method] This method inserts all the sorters in the passed array at the given index

Returns

ICollection

Ext.util.Collection this

public static last(): any

[Method] Returns the last item in the collection

Returns

any

Object the last item in the collection.

public static lookup(store?: any): IStore

[Method] Gets a registered Store by its id returns a passed store instance or returns a new instance of a store created with

Parameters

  • store?: any optional

    String/Object The id of the Store, or a Store instance, or a store configuration.

Returns

IStore

Ext.data.Store

public static register(stores: IStore)

[Method] Registers one or more Stores with the StoreManager

Parameters

  • stores: IStore

    Ext.data.Store... Any number of Store instances.

public static remove(item?: any): any

[Method] Remove an item from the collection

Parameters

  • item?: any optional

    Object The item to remove.

Returns

any

Object The item removed or false if no item was removed.

public static removeAll(items?: Array<any>): IMixedCollection

[Method] Remove all items in the passed array from the collection

Parameters

  • items?: Array<any> optional

    Array An array of items to be removed.

Returns

IMixedCollection

Ext.util.MixedCollection this object

public static removeAt(index?: number): any

[Method] Remove an item from a specified index in the collection

Parameters

  • index?: number optional

    Number The index within the collection of the item to remove.

Returns

any

Object The item removed or false if no item was removed.

public static removeAtKey(key?: string): any

[Method] Removed an item associated with the passed key from the collection

Parameters

  • key?: string optional

    String The key of the item to remove.

Returns

any

Object/Boolean The item removed or false if no item was removed.

public static removeFilters(filters?: any): ICollection

[Method] This method removes all the filters in a passed array

Parameters

  • filters?: any optional

    Object

Returns

ICollection

Ext.util.Collection this

public static removeSorter(sorter?: any)

[Method] This method removes a sorter

Parameters

  • sorter?: any optional

    Ext.util.Sorter/String/Function/Object Can be an instance of Ext.util.Sorter, a string indicating a property name, an object representing an Ext.util.Sorter configuration, or a sort function.

public static removeSorters(sorters?: any): ICollection

[Method] This method removes all the sorters in a passed array

Parameters

  • sorters?: any optional

    Object

Returns

ICollection

Ext.util.Collection this

public static replace(oldKey?: string, item?: any): any

[Method] Replaces an item in the collection

Parameters

  • oldKey?: string optional

    String The key associated with the item to replace, or the replacement item. If you supplied a getKey implementation for this MixedCollection, or if the key of your stored items is in a property called id, then the MixedCollection will be able to derive the key of the replacement item. If you want to replace an item with one having the same key value, then just pass the replacement item in this parameter.

  • item?: any optional

    Object {Object} item (optional) If the first parameter passed was a key, the item to associate with that key.

Returns

any

Object The new item.

public static setAutoFilter(autoFilter?: boolean)

[Method] Sets the value of autoFilter

Parameters

  • autoFilter?: boolean optional

    Boolean The new value.

public static setAutoSort(autoSort?: boolean)

[Method] Sets the value of autoSort

Parameters

  • autoSort?: boolean optional

    Boolean The new value.

public static setDefaultSortDirection(defaultSortDirection?: string)

[Method] Sets the value of defaultSortDirection

Parameters

  • defaultSortDirection?: string optional

    String The new value.

public static setFilterRoot(filterRoot?: string)

[Method] Sets the value of filterRoot

Parameters

  • filterRoot?: string optional

    String The new value.

public static setFilters(filters?: Array<any>)

[Method] Sets the value of filters

Parameters

  • filters?: Array<any> optional

    Array The new value.

public static setSortRoot(sortRoot?: string)

[Method] Sets the value of sortRoot

Parameters

  • sortRoot?: string optional

    String The new value.

public static setSorters(sorters?: Array<any>)

[Method] Sets the value of sorters

Parameters

  • sorters?: Array<any> optional

    Array The new value.

public static sort(sorters?: any, defaultDirection?: any): Array<any>

[Method] This method will sort an array based on the currently configured sorters

Parameters

  • sorters?: any optional

    Object

  • defaultDirection?: any optional

    Object

Returns

Array<any>

Array The array you passed after it is sorted.

public static statics(): IClass

[Method] Get the reference to the class from which this object was instantiated

Returns

IClass

Ext.Class

public static unregister(stores?: any)

[Method] Unregisters one or more Stores with the StoreManager

Parameters

  • stores?: any optional

    String/Object... Any number of Store instances or ID-s.