PHP 클래스 yii\grid\Column

부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\base\Object
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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.

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
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.

메소드 상세

getHeaderCellLabel() 보호된 메소드

This method may be overridden to customize the label of the header cell.
부터: 2.0.8
protected getHeaderCellLabel ( ) : string
리턴 string label

renderDataCell() 공개 메소드

Renders a data cell.
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]].
리턴 string the rendering result

renderDataCellContent() 보호된 메소드

Renders the data cell content.
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]].
리턴 string the rendering result

renderFilterCell() 공개 메소드

Renders the filter cell.
public renderFilterCell ( )

renderFilterCellContent() 보호된 메소드

The default implementation simply renders a space. This method may be overridden to customize the rendering of the filter cell (if any).
protected renderFilterCellContent ( ) : string
리턴 string the rendering result

renderFooterCell() 공개 메소드

Renders the footer cell.
public renderFooterCell ( )

renderFooterCellContent() 보호된 메소드

The default implementation simply renders [[footer]]. This method may be overridden to customize the rendering of the footer cell.
protected renderFooterCellContent ( ) : string
리턴 string the rendering result

renderHeaderCell() 공개 메소드

Renders the header cell.
public renderHeaderCell ( )

renderHeaderCellContent() 보호된 메소드

The default implementation simply renders [[header]]. This method may be overridden to customize the rendering of the header cell.
protected renderHeaderCellContent ( ) : string
리턴 string the rendering result

프로퍼티 상세

$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.
public $content

$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.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $contentOptions

$filterOptions 공개적으로 프로퍼티

the HTML attributes for the filter cell tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $filterOptions

$footerOptions 공개적으로 프로퍼티

the HTML attributes for the footer cell tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $footerOptions

$grid 공개적으로 프로퍼티

the grid view object that owns this column.
public $grid

$header 공개적으로 프로퍼티

the header cell content. Note that it will not be HTML-encoded.
public $header

$headerOptions 공개적으로 프로퍼티

the HTML attributes for the header cell tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $headerOptions

$options 공개적으로 프로퍼티

the HTML attributes for the column group tag.
또한 보기: yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
public $options

$visible 공개적으로 프로퍼티

whether this column is visible. Defaults to true.
public $visible