Table Widget.

Represents an editable tabular control.


Public Properties

There are no public properties in the class.

Show inherited public properties

Inherited Public Properties

Protected Properties

protected $defaultAlias

defaultAlias to identify this widget.

protected array $columns

Table columns

protected boolean $showHeader

Show data table header

protected Backend\Widgets\Table\DatasourceBase $dataSource

protected string $fieldName

Field name used for request data.

protected string $recordsKeyFrom

protected array $dataSourceAliases

Show inherited protected properties

Inherited Protected Properties

Public Methods

public getDataSource()

public getDataSource(): Backend\Widgets\Table\DataSourceBase 

Returns the data source object.

public init()

public init(): void

Initialize the widget, called by the constructor and free from its parameters.

public onGetAutocompleteOptions()

public onGetAutocompleteOptions(): void

public onGetDropdownOptions()

public onGetDropdownOptions(): void

public onServerCreateRecord()

public onServerCreateRecord(): void

public onServerDeleteRecord()

public onServerDeleteRecord(): void

public onServerGetRecords()

public onServerGetRecords(): void

public onServerSearchRecords()

public onServerSearchRecords(): void

public onServerUpdateRecord()

public onServerUpdateRecord(): void

public prepareVars()

public prepareVars(): void

prepareVars for display

public render()

public render(): void

Renders the widget.

Show inherited public methods

Inherited Public Methods

Protected Methods

protected isClientDataSource()

protected isClientDataSource(): bool 

protected loadAssets()

protected loadAssets(): void

loadAssets adds widget specific asset files. Use $this->addJs() and $this->addCss() to register new assets to include on the page.

protected prepareColumnsArray()

protected prepareColumnsArray(): void

Converts the columns associative array to a regular array and translates column headers and drop-down options. Working with regular arrays is much faster in JavaScript. References:

Show inherited protected methods

Inherited Protected Methods