PHP Class kartik\grid\FormulaColumn

DataColumn is the default column type for the GridView widget.
Since: 1.0
Author: Kartik Visweswaran ([email protected])
Inheritance: extends DataColumn
Show file Open project: kartik-v/yii2-grid

Public Properties

Property Type Description
$autoFooter automatically generate the footer. If set to true, it will use the same formula to generate the footer. If set to false, will use the default footer.

Public Methods

Method Description
col ( integer $i, array $params = [] ) : string Gets the value of a column

Protected Methods

Method Description
getFooterCellContent ( ) : string Get the raw footer cell content.
renderFooterCellContent ( ) : string Formatted footer cell content.

Method Details

col() public method

Gets the value of a column
public col ( integer $i, array $params = [] ) : string
$i integer the index of the grid column (the first column in the grid will be zero indexed). Note a column's index is to be considered, even if the `visible` property is set to false.
$params array which will contain these keys: - `model`: _yii\base\Model`, the data model being rendered - `key`: _string|object_, the key associated with the data model - `index`: _integer_, the zero-based index of the data item among the item array returned by [[GridView::dataProvider]]. - widget: _FormulaColumn_, the current column widget instance
return string

getFooterCellContent() protected method

Get the raw footer cell content.
protected getFooterCellContent ( ) : string
return string the rendering result

renderFooterCellContent() protected method

Formatted footer cell content.
protected renderFooterCellContent ( ) : string
return string the rendering result

Property Details

$autoFooter public property

automatically generate the footer. If set to true, it will use the same formula to generate the footer. If set to false, will use the default footer.
public $autoFooter