Constants

TYPE_STRIPED

TYPE_STRIPED

TYPE_BORDERED

TYPE_BORDERED

TYPE_CONDENSED

TYPE_CONDENSED

TYPE_HOVER

TYPE_HOVER

MERGE_SIMPLE

MERGE_SIMPLE

MERGE_NESTED

MERGE_NESTED

MERGE_FIRSTROW

MERGE_FIRSTROW

Properties

$type

$type : string|array

Type

string|array — the table type. Valid values are 'striped', 'bordered', 'condensed' and/or 'hover'.

$pagerCssClass

$pagerCssClass : string

Type

string — the CSS class name for the pager container. Defaults to 'pagination'.

$pager

$pager : array

Type

array — the configuration for the pager. Defaults to <code>array('class'=>'ext.booster.widgets.TbPager')</code>.

$cssFile

$cssFile : string

Type

string — the URL of the CSS file used by this grid view. Defaults to false, meaning that no CSS will be included.

$responsiveTable

$responsiveTable : bool

Type

bool — whether to make the grid responsive

$extraParams

$extraParams : array

Type

array — of additional parameters to pass to values

$mergeColumns

$mergeColumns : array

Type

array — the columns to merge on the grid

$mergeType

$mergeType : string

Type

string — the merge type. Defaults to MERGE_SIMPLE

$mergeCellCss

$mergeCellCss : string

Type

string — the styles to apply to merged cells

$extraRowColumns

$extraRowColumns : array

Type

array — the group column names

$extraRowExpression

$extraRowExpression : string

Type

string

$extraRowHtmlOptions

$extraRowHtmlOptions : array

Type

array — the HTML options for the extrarow cell tag.

$extraRowCssClass

$extraRowCssClass : string

Type

string — the class to be used to be set on the extrarow cell tag.

$columns

$columns : \TbDataColumn[]

Type

\TbDataColumn[]

$dataProvider

$dataProvider : \CActiveDataProvider

the data provider for the view.

Type

\CActiveDataProvider

$_changes

$_changes : array

Type

array — the column data changes

Methods

init()

init()

Widget initialization

Initializes the widget.

registerClientScript()

registerClientScript()

Registers necessary client scripts.

renderTableBody()

renderTableBody()

Renders the table body.

groupByColumns()

groupByColumns()

find and store changing of group columns

renderTableRow()

renderTableRow(int $row)

Renders a table body row.

Parameters

int $row

initColumns()

initColumns()

### .initColumns()

Creates column objects and initializes them.

createDataColumn()

createDataColumn(mixed $text) : \TbDataColumn|\CDataColumn

### .createDataColumn()

Creates a column based on a shortcut column specification string.

Parameters

mixed $text

the column specification string

Throws

\CException

if the column format is incorrect

Returns

\TbDataColumn|\CDataColumn —

the column instance

writeResponsiveCss()

writeResponsiveCss()

### .writeResponsiveCss()

Writes responsiveCSS

getRowValues()

getRowValues(string[]|\TbDataColumn[] $columns, \CActiveRecord $data, mixed $rowIndex) : mixed

returns array of rendered column values (TD)

Parameters

string[]|\TbDataColumn[] $columns
\CActiveRecord $data
mixed $rowIndex

Throws

\CException

Returns

mixed

renderExtraRow()

renderExtraRow(mixed $beforeRow, mixed $change, array $columnsInExtra)

renders extra row

Parameters

mixed $beforeRow
mixed $change
array $columnsInExtra

getDataCellContent()

getDataCellContent(\TbDataColumn $column, mixed $data, mixed $row) : string

need to rewrite this function as it is protected in CDataColumn: it is strange as all methods inside are public

Parameters

\TbDataColumn $column
mixed $data
mixed $row

Returns

string