LimeSurvey API - Master branch

CLSGridView extends TbGridView
in package

Bootstrap Zii grid view.

Table of Contents

Properties

$caption  : string|null
Optional table caption. When set, a <caption> element is rendered inside the grid table.
$cssFile  : string
$lsAdditionalColumns  : array<string|int, mixed>
An array of columns that should be selectable for display
$lsAdditionalColumnsSelected  : array<string|int, mixed>
An array of columns that is selected for display
$lsAfterAjaxUpdate  : array<string|int, mixed>
An array of Javascript functions that will be passed to afterAjaxUpdate
$massiveActionTemplate  : string
$pager  : array<string|int, mixed>
$rowLink  : string
string for a link that is on every row
$template  : string
$type  : string|array<string|int, mixed>

Methods

init()  : mixed
Initializes the widget.
registerClientScript()  : mixed
Registers necessary client scripts.
renderItems()  : mixed
Renders the data items for the grid view.
addColumns()  : void
appendAdditionalColumns()  : void
Appends columns to the gridview based on the selected columns of the columnFilter param.
createDataColumn()  : TbDataColumn|CDataColumn
Creates a column based on a shortcut column specification string.
initColumns()  : mixed
Creates column objects and initializes them.
lsAfterAjaxUpdate()  : void
parse javascript snippets to TbGridView's afterAjaxUpdate and insert global javascript snippets for griviews
rowLink()  : void
Adds the data-rowlink attribute to $this->rowHtmlOptionsExpression to be used by the rowLink.js The JS adds a link to every td element of the row
registerGridviewScripts()  : mixed

Properties

$caption

Optional table caption. When set, a <caption> element is rendered inside the grid table.

public string|null $caption

$cssFile

public string $cssFile = \false

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

$lsAdditionalColumns

An array of columns that should be selectable for display

public array<string|int, mixed> $lsAdditionalColumns = []

$lsAdditionalColumnsSelected

An array of columns that is selected for display

public array<string|int, mixed> $lsAdditionalColumnsSelected = []

$lsAfterAjaxUpdate

An array of Javascript functions that will be passed to afterAjaxUpdate

public array<string|int, mixed> $lsAfterAjaxUpdate

$massiveActionTemplate

public string $massiveActionTemplate = ''

$pager

public array<string|int, mixed> $pager = array('class' => '\\TbPager')

the configuration for the pager. Defaults to array('class'=>'ext.yiistrap.widgets.TbPager').

string for a link that is on every row

public string $rowLink

$template

public string $template = "{items}\n<div class=\"row-fluid\"><div class=\"span6\">{pager}</div><div class=\"span6\">{summary}</div></div>"

the template to be used to control the layout of various sections in the view.

$type

public string|array<string|int, mixed> $type

the table style. Valid values are TbHtml::GRID_TYPE_STRIPED, TbHtml::GRID_TYPE_BORDERED, TbHtml::GRID_TYPE_CONDENSED and/or TbHtml::GRID_TYPE_HOVER.

Methods

init()

Initializes the widget.

public init() : mixed
Tags
throws
CException

registerClientScript()

Registers necessary client scripts.

public registerClientScript() : mixed

customization for CLSGridview

Tags
throws
CException

renderItems()

Renders the data items for the grid view.

public renderItems() : mixed

Overrides parent to output an optional table caption after the opening

tag.

addColumns()

protected addColumns(array<string|int, mixed> $selectedColumns) : void
Parameters
$selectedColumns : array<string|int, mixed>

appendAdditionalColumns()

Appends columns to the gridview based on the selected columns of the columnFilter param.

protected appendAdditionalColumns() : void

If available loads saved column filter from user settings.

createDataColumn()

Creates a column based on a shortcut column specification string.

protected createDataColumn(mixed $text) : TbDataColumn|CDataColumn
Parameters
$text : mixed

the column specification string

Tags
throws
CException

if the column format is incorrect

Return values
TbDataColumn|CDataColumn

the column instance

initColumns()

Creates column objects and initializes them.

protected initColumns() : mixed

lsAfterAjaxUpdate()

parse javascript snippets to TbGridView's afterAjaxUpdate and insert global javascript snippets for griviews

protected lsAfterAjaxUpdate() : void

Adds the data-rowlink attribute to $this->rowHtmlOptionsExpression to be used by the rowLink.js The JS adds a link to every td element of the row

protected rowLink() : void

registerGridviewScripts()

private registerGridviewScripts() : mixed

        
On this page

Search results