PHP Класс kartik\grid\CheckboxColumn

CheckboxColumn displays a column of checkboxes in a grid view.
С версии: 1.0
Автор: Kartik Visweswaran ([email protected])
Наследование: extends yii\grid\CheckboxColumn, use trait ColumnTrait
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$attribute the model attribute to be used in rendering the checkbox input.
$cssClass the css class that will be used to find the checkboxes.
$hAlign the horizontal alignment of each column. Should be one of [[GridView::ALIGN_LEFT]], [[GridView::ALIGN_RIGHT]], or [[GridView::ALIGN_CENTER]].
$hidden whether the column is hidden from display. This is different than the visible property, in the sense, that the column is rendered, but hidden from display. This will allow you to still export the column using the export function.
$hiddenFromExport whether the column is hidden in export output. If set to boolean true, it will hide the column for all export formats. If set as an array, it will accept the list of GridView export formats and hide output only for them.
$hidePageSummary whether to just hide the page summary display but still calculate the summary based on [[pageSummary]] settings
$mergeHeader whether to merge the header title row and the filter row This will not render the filter for the column and can be used when filter is set to false. Defaults to false. This is only applicable when [[GridView::filterPosition]] for the grid is set to [[GridView::FILTER_POS_BODY]].
$noWrap whether to force no wrapping on all table cells in the column
$pageSummary the page summary that is displayed above the footer. You can set it to one of the following: - false: the summary will not be displayed. - true: the page summary for the column will be calculated and displayed using the [[pageSummaryFunc]] setting. - string: will be displayed as is. - Closure: you can set it to an anonymous function with the following signature: php example 1 function ($summary, $data, $widget) { return 'Count is ' . $summary; } example 2 function ($summary, $data, $widget) { return 'Range ' . min($data) . ' to ' . max($data); } where: - the $summary variable will be replaced with the calculated summary using the [[pageSummaryFunc]] setting. - the $data variable will contain array of the selected page rows for the column.
$pageSummaryFunc the summary function that will be used to calculate the page summary for the column.
$pageSummaryOptions HTML attributes for the page summary cell. The following special attributes are available: - prepend: _string_, a prefix string that will be prepended before the pageSummary content - append: _string_, a suffix string that will be appended after the pageSummary content
$rowHighlight highlight current row if checkbox is checked
$rowSelectedClass highlight CSS class to be applied for highlighting the row. Defaults to [[GridView::TYPE_DANGER]].
$vAlign the vertical alignment of each column. Should be one of [[GridView::ALIGN_TOP]], [[GridView::ALIGN_BOTTOM]], or [[GridView::ALIGN_MIDDLE]].
$width the width of each column (matches the CSS width property).

Защищенные свойства (Protected)

Свойство Тип Описание
$_clientScript the internally generated client script to initialize
$_columnKey the internally generated column key

Открытые методы

Метод Описание
init ( )
renderDataCell ( $model, $key, $index )

Описание методов

init() публичный Метод

public init ( )

renderDataCell() публичный Метод

public renderDataCell ( $model, $key, $index )

Описание свойств

$_clientScript защищенное свойство

the internally generated client script to initialize
protected $_clientScript

$_columnKey защищенное свойство

the internally generated column key
protected $_columnKey

$attribute публичное свойство

the model attribute to be used in rendering the checkbox input.
public $attribute

$cssClass публичное свойство

the css class that will be used to find the checkboxes.
public $cssClass

$hAlign публичное свойство

the horizontal alignment of each column. Should be one of [[GridView::ALIGN_LEFT]], [[GridView::ALIGN_RIGHT]], or [[GridView::ALIGN_CENTER]].
public $hAlign

$hidden публичное свойство

whether the column is hidden from display. This is different than the visible property, in the sense, that the column is rendered, but hidden from display. This will allow you to still export the column using the export function.
public $hidden

$hiddenFromExport публичное свойство

whether the column is hidden in export output. If set to boolean true, it will hide the column for all export formats. If set as an array, it will accept the list of GridView export formats and hide output only for them.
public $hiddenFromExport

$hidePageSummary публичное свойство

whether to just hide the page summary display but still calculate the summary based on [[pageSummary]] settings
public $hidePageSummary

$mergeHeader публичное свойство

whether to merge the header title row and the filter row This will not render the filter for the column and can be used when filter is set to false. Defaults to false. This is only applicable when [[GridView::filterPosition]] for the grid is set to [[GridView::FILTER_POS_BODY]].
public $mergeHeader

$noWrap публичное свойство

whether to force no wrapping on all table cells in the column
См. также: http://www.w3schools.com/cssref/pr_text_white-space.asp
public $noWrap

$pageSummary публичное свойство

the page summary that is displayed above the footer. You can set it to one of the following: - false: the summary will not be displayed. - true: the page summary for the column will be calculated and displayed using the [[pageSummaryFunc]] setting. - string: will be displayed as is. - Closure: you can set it to an anonymous function with the following signature: php example 1 function ($summary, $data, $widget) { return 'Count is ' . $summary; } example 2 function ($summary, $data, $widget) { return 'Range ' . min($data) . ' to ' . max($data); } where: - the $summary variable will be replaced with the calculated summary using the [[pageSummaryFunc]] setting. - the $data variable will contain array of the selected page rows for the column.
public $pageSummary

$pageSummaryFunc публичное свойство

the summary function that will be used to calculate the page summary for the column.
public $pageSummaryFunc

$pageSummaryOptions публичное свойство

HTML attributes for the page summary cell. The following special attributes are available: - prepend: _string_, a prefix string that will be prepended before the pageSummary content - append: _string_, a suffix string that will be appended after the pageSummary content
public $pageSummaryOptions

$rowHighlight публичное свойство

highlight current row if checkbox is checked
public $rowHighlight

$rowSelectedClass публичное свойство

highlight CSS class to be applied for highlighting the row. Defaults to [[GridView::TYPE_DANGER]].
public $rowSelectedClass

$vAlign публичное свойство

the vertical alignment of each column. Should be one of [[GridView::ALIGN_TOP]], [[GridView::ALIGN_BOTTOM]], or [[GridView::ALIGN_MIDDLE]].
public $vAlign

$width публичное свойство

the width of each column (matches the CSS width property).
См. также: http://www.w3schools.com/cssref/pr_dim_width.asp
public $width