Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Widget

Widget is the base class for widgets.

For more details and usage information on Widget, see the guide article on widgets.

author

Mahesh S Warrier https://github.com/codespede

Hierarchy

Index

Constructors

  • new Widget(config: {}): Widget

Properties

_id: any
enablePjax: boolean = true

Whether to enable Pjax on this widget.

initialization: Promise<void>

A Promise which resolves when this Component has been successfully initialized.

options: {} = {}

The HTML attributes for the container tag of the widget.

see

Html.renderTagAttributes for details on how attributes are being rendered.

Type declaration

  • [key: string]: any
autoIdPrefix: string = 'w'

The prefix to the automatically generated widget IDs.

see

getId

counter: number = 0

A counter used to generate id for widgets.

internal

Methods

  • getId(autogenerate?: boolean): string
  • Returns the ID of the widget.

    Parameters

    • autogenerate: boolean = true

    Returns string

    ID of the widget.

  • init(): Promise<void>
  • registerAssets(): void
  • render(): Promise<string>
  • Renders a widget.

    throws

    InvalidArgumentException if the view file does not exist.

    Returns Promise<string>

    string the rendering result.

  • run(): Promise<any>
  • Executes the widget.

    Returns Promise<any>

    the result of widget execution to be outputted.

Generated using TypeDoc