Class ModelManager

Index

Properties

Methods

Properties

public static all: IHashMap

[Property] (Ext.util.HashMap)

public static associationStack: any

[Property] (Object)

public static defaultProxyType: any

[Property] (Object)

public static self: IClass

[Property] (Ext.Class)

Methods

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 create(data?: any, name?: string, id?: number): any

[Method] Creates a new instance of a Model using the given data

Parameters

  • data?: any optional

    Object Data to initialize the Model's fields with.

  • name?: string optional

    String The name of the model to create.

  • id?: number optional

    Number Unique id of the Model instance (see Ext.data.Model).

Returns

any

Object

public static destroy()

[Method]

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

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

Parameters

  • fn?: any optional

    Function The function to execute.

  • scope?: any optional

    Object The scope to execute in.

public static get(id?: string): any

[Method] Returns an item by id

Parameters

  • id?: string optional

    String The id of the item.

Returns

any

Object The item, undefined if not found.

public static getCount(): number

[Method] Gets the number of items in the collection

Returns

number

Number The number of items in the collection.

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 getModel(id?: any): IModel

[Method] Returns the Ext data Model for a given model name

Parameters

  • id?: any optional

    String/Object The id of the model or the model instance.

Returns

IModel

Ext.data.Model A model class.

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 isRegistered(type?: string): boolean

[Method] Checks if an item type is registered

Parameters

  • type?: string optional

    String The mnemonic string by which the class may be looked up.

Returns

boolean

Boolean Whether the type is registered.

public static onAvailable(id?: string, fn?: any, scope?: any)

[Method] Registers a function that will be called when an item with the specified id is added to the manager

Parameters

  • id?: string optional

    String The item id.

  • fn?: any optional

    Function The callback function. Called with a single parameter, the item.

  • scope?: any optional

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

public static register(item?: any)

[Method] Registers an item to be managed

Parameters

  • item?: any optional

    Object The item to register.

public static registerType(name?: any, config?: any): any

[Method] Registers a model definition

Parameters

  • name?: any optional

    Object

  • config?: any optional

    Object

Returns

any

Object

public static statics(): IClass

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

Returns

IClass

Ext.Class

public static unregister(item?: any)

[Method] Unregisters an item by removing it from this manager

Parameters

  • item?: any optional

    Object The item to unregister.