Class Format

Index

Properties

Methods

Properties

public static defaultDateFormat: string

[Property] (String)

public static potentialUndefinedKeys: Array<any>

[Property] (Array)

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 date(value?: any, format?: string): string

[Method] Parse a value into a formatted date using the specified format pattern

Parameters

  • value?: any optional

    String/Date The value to format. Strings must conform to the format expected by the JavaScript Date object's parse() method.

  • format?: string optional

    String Any valid date format string.

Returns

string

String The formatted date string.

public static destroy()

[Method]

public static ellipsis(value?: string, length?: number, word?: boolean): string

[Method] Truncate a string and add an ellipsis to the end if it exceeds the specified length

Parameters

  • value?: string optional

    String The string to truncate.

  • length?: number optional

    Number The maximum length to allow before truncating.

  • word?: boolean optional

    Boolean True to try to find a common word break.

Returns

string

String The converted text.

public static escape(string?: string): string

[Method] Escapes the passed string for and

Parameters

  • string?: string optional

    String The string to escape.

Returns

string

String The escaped string.

public static escapeRegex(str?: string): string

[Method] Escapes the passed string for use in a regular expression

Parameters

  • str?: string optional

    String

Returns

string

String

public static format(string: string, values?: Array<any>): string

[Method] Allows you to define a tokenized string and pass an arbitrary number of arguments to replace the tokens

Parameters

  • string: string

    String The tokenized string to be formatted.

  • values?: Array<any> optional

    String... The values to replace token {0}, {1}, etc.

Returns

string

String The formatted string.

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 htmlDecode(value?: string): string

[Method] Convert certain characters amp lt and from their HTML character equivalents

Parameters

  • value?: string optional

    String The string to decode.

Returns

string

String The decoded text.

public static htmlEncode(value?: string): string

[Method] Convert certain characters amp lt and to their HTML character equivalents for literal display in web pages

Parameters

  • value?: string optional

    String The string to encode.

Returns

string

String The encoded text.

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 leftPad(string?: string, size?: number, char?: string): string

[Method] Pads the left side of a string with a specified character

Parameters

  • string?: string optional

    String The original string.

  • size?: number optional

    Number The total length of the output string.

  • char?: string optional

    String The character with which to pad the original string.

Returns

string

String The padded string.

public static statics(): IClass

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

Returns

IClass

Ext.Class

public static toggle(string?: string, value?: string, other?: string): string

[Method] Utility function that allows you to easily switch a string between two alternating values

Parameters

  • string?: string optional

    String The current string

  • value?: string optional

    String The value to compare to the current string

  • other?: string optional

    String The new value to use if the string already equals the first value passed in

Returns

string

String The new value

public static trim(string?: string): string

[Method] Trims whitespace from either end of a string leaving spaces within the string intact

Parameters

  • string?: string optional

    String The string to escape

Returns

string

String The trimmed string