Interface ITemplate

Hierarchy

Index

Properties

Methods

Properties

optional public alias?: Array<string>

[Config Option] (String[])

optional public alternateClassName?: any

[Config Option] (String/String[])

optional public compiled?: boolean

[Config Option] (Boolean)

optional public config?: any

[Config Option] (Object)

optional public disableFormats?: boolean

[Config Option] (Boolean)

optional public extend?: string

[Config Option] (String)

optional public inheritableStatics?: any

[Config Option] (Object)

optional public isTemplate?: boolean

[Property] (Boolean)

optional public mixins?: any

[Config Option] (Object)

optional public platformConfig?: any

[Config Option] (Object)

optional public self?: IClass

[Property] (Ext.Class)

optional public singleton?: boolean

[Config Option] (Boolean)

optional public statics?: any

[Config Option] (Object)

optional public uses?: Array<string>

[Config Option] (String[])

Methods

optional public append(el?: any, values?: any, returnElement?: boolean): any

[Method] Applies the supplied values to the template and appends the new node s to the specified el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element.

  • values?: any optional

    Object/Array The template values. See applyTemplate for details.

  • returnElement?: boolean optional

    Boolean true to return an Ext.Element.

Returns

any

HTMLElement/Ext.Element The new node or Element.

optional public apply(values?: any): string

[Method] Returns an HTML fragment of this template with the specified values applied

Parameters

  • values?: any optional

    Object/Array The template values. Can be an array if your params are numeric: var tpl = new Ext.Template('Name: {0}, Age: {1}'); tpl.apply(['John', 25]); or an object: var tpl = new Ext.Template('Name: {name}, Age: {age}'); tpl.apply({name: 'John', age: 25});

Returns

string

String The HTML fragment.

optional public applyOut(values?: any, out?: Array<any>): Array<any>

[Method] Appends the result of this template to the provided output array

Parameters

  • values?: any optional

    Object/Array The template values. See apply.

  • out?: Array<any> optional

    Array The array to which output is pushed.

Returns

Array<any>

Array The given out array.

optional public applyTemplate(values?: any): string

[Method] Alias for apply

Parameters

  • values?: any optional

    Object/Array The template values. Can be an array if your params are numeric: var tpl = new Ext.Template('Name: {0}, Age: {1}'); tpl.apply(['John', 25]); or an object: var tpl = new Ext.Template('Name: {name}, Age: {age}'); tpl.apply({name: 'John', age: 25});

Returns

string

String The HTML fragment.

optional public 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

optional public 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

optional public 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

optional public compile(): ITemplate

[Method] Compiles the template into an internal function eliminating the RegEx overhead

Returns

ITemplate

Ext.Template this

optional public destroy()

[Method]

optional public 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

optional public 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

optional public insertAfter(el?: any, values?: any, returnElement?: boolean): any

[Method] Applies the supplied values to the template and inserts the new node s after el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element.

  • values?: any optional

    Object/Array The template values. See applyTemplate for details.

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element.

Returns

any

HTMLElement/Ext.Element The new node or Element.

optional public insertBefore(el?: any, values?: any, returnElement?: boolean): any

[Method] Applies the supplied values to the template and inserts the new node s before el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element.

  • values?: any optional

    Object/Array The template values. See applyTemplate for details.

  • returnElement?: boolean optional

    Boolean true to return an Ext.Element.

Returns

any

HTMLElement/Ext.Element The new node or Element

optional public insertFirst(el?: any, values?: any, returnElement?: boolean): any

[Method] Applies the supplied values to the template and inserts the new node s as the first child of el

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element.

  • values?: any optional

    Object/Array The template values. See applyTemplate for details.

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element.

Returns

any

HTMLElement/Ext.Element The new node or Element.

optional public overwrite(el?: any, values?: any, returnElement?: boolean): any

[Method] Applies the supplied values to the template and overwrites the content of el with the new node s

Parameters

  • el?: any optional

    String/HTMLElement/Ext.Element The context element.

  • values?: any optional

    Object/Array The template values. See applyTemplate for details.

  • returnElement?: boolean optional

    Boolean true to return a Ext.Element.

Returns

any

HTMLElement/Ext.Element The new node or Element.

optional public set(html?: string, compile?: boolean): ITemplate

[Method] Sets the HTML used as the template and optionally compiles it

Parameters

  • html?: string optional

    String

  • compile?: boolean optional

    Boolean true to compile the template.

Returns

ITemplate

Ext.Template this