Property | Type | Description | |
---|---|---|---|
$content | This is a callable that will be used to generate the content of each cell. The signature of the function should be the following: function ($model, $key, $index, $column). Where $model, $key, and $index refer to the model, key and index of the row currently being rendered and $column is a reference to the Column object. | ||
$contentOptions | the HTML attributes for the data cell tag. This can either be an array of attributes or an anonymous function ([[Closure]]) that returns such an array. The signature of the function should be the following: function ($model, $key, $index, $column). Where $model, $key, and $index refer to the model, key and index of the row currently being rendered and $column is a reference to the Column object. A function may be used to assign different attributes to different rows based on the data in that row. | ||
$filterOptions | the HTML attributes for the filter cell tag. | ||
$footer | the footer cell content. Note that it will not be HTML-encoded. | ||
$footerOptions | the HTML attributes for the footer cell tag. | ||
$grid | the grid view object that owns this column. | ||
$header | the header cell content. Note that it will not be HTML-encoded. | ||
$headerOptions | the HTML attributes for the header cell tag. | ||
$options | the HTML attributes for the column group tag. | ||
$visible | whether this column is visible. Defaults to true. |
Method | Description | |
---|---|---|
renderDataCell ( mixed $model, mixed $key, integer $index ) : string | Renders a data cell. | |
renderFilterCell ( ) | Renders the filter cell. | |
renderFooterCell ( ) | Renders the footer cell. | |
renderHeaderCell ( ) | Renders the header cell. |
Method | Description | |
---|---|---|
getHeaderCellLabel ( ) : string | Returns header cell label. | |
renderDataCellContent ( mixed $model, mixed $key, integer $index ) : string | Renders the data cell content. | |
renderFilterCellContent ( ) : string | Renders the filter cell content. | |
renderFooterCellContent ( ) : string | Renders the footer cell content. | |
renderHeaderCellContent ( ) : string | Renders the header cell content. |
protected getHeaderCellLabel ( ) : string | ||
return | string | label |
public renderDataCell ( mixed $model, mixed $key, integer $index ) : string | ||
$model | mixed | the data model being rendered |
$key | mixed | 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]]. |
return | string | the rendering result |
protected renderDataCellContent ( mixed $model, mixed $key, integer $index ) : string | ||
$model | mixed | the data model |
$key | mixed | the key associated with the data model |
$index | integer | the zero-based index of the data model among the models array returned by [[GridView::dataProvider]]. |
return | string | the rendering result |
protected renderFilterCellContent ( ) : string | ||
return | string | the rendering result |
protected renderHeaderCellContent ( ) : string | ||
return | string | the rendering result |
public $content |
public $contentOptions |
public $filterOptions |
public $header |
public $headerOptions |