PHP 클래스 kartik\grid\ActionColumn

ActionColumn is a column for the GridView widget that displays buttons for viewing and manipulating the items.
부터: 1.0
저자: Kartik Visweswaran ([email protected])
상속: extends yii\grid\ActionColumn, use trait ColumnTrait
파일 보기 프로젝트 열기: kartik-v/yii2-grid 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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). A function may be used to assign different attributes to different rows based on the data in that row.
$deleteOptions HTML attributes for the delete action button. The following additional options are recognized: - label: _string_, the label for the delete action button. This is not html encoded. Defaults to Delete. - message: _string_, the delete confirmation message to display when the delete button is clicked. Defaults to Are you sure to delete this item?.
$dropdown whether the action buttons are to be displayed as a dropdown
$dropdownButton the dropdown button options. This configuration will be applicable only if [[dropdown]] is true. The following special options are recognized: - label: _string_', the button label to be displayed. Defaults to Actions. - caret: _string_', the caret symbol to be appended to the dropdown button. Defaults to .
$dropdownMenu the HTML attributes for the Dropdown menu. Applicable if dropdown is true.
$dropdownOptions the HTML attributes for the Dropdown container. The class dropdown will be added. To align a dropdown at the right edge of the page container, you set the class to pull-right.
$hAlign the horizontal alignment of each column. Should be one of [[GridView::ALIGN_LEFT]], [[GridView::ALIGN_RIGHT]], or [[GridView::ALIGN_CENTER]].
$headerOptions the HTML attributes for the header cell tag.
$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
$updateOptions HTML attributes for the update action button. The following additional option is recognized: - label: _string_, the label for the update action button. This is not html encoded. Defaults to Update.
$vAlign the vertical alignment of each column. Should be one of [[GridView::ALIGN_TOP]], [[GridView::ALIGN_BOTTOM]], or [[GridView::ALIGN_MIDDLE]].
$viewOptions HTML attributes for the view action button. The following additional option is recognized: label: _string_, the label for the view action button. This is not html encoded. Defaults to View.
$width the width of each column (matches the CSS width property).

보호된 프로퍼티들

프로퍼티 타입 설명
$_isDropdown is the dropdown menu to be rendered?

공개 메소드들

메소드 설명
init ( )
renderDataCell ( $model, $key, $index )

보호된 메소드들

메소드 설명
initDefaultButtons ( )
renderDataCellContent ( $model, $key, $index )

메소드 상세

init() 공개 메소드

public init ( )

initDefaultButtons() 보호된 메소드

protected initDefaultButtons ( )

renderDataCell() 공개 메소드

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

renderDataCellContent() 보호된 메소드

protected renderDataCellContent ( $model, $key, $index )

프로퍼티 상세

$_isDropdown 보호되어 있는 프로퍼티

is the dropdown menu to be rendered?
protected $_isDropdown

$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). A function may be used to assign different attributes to different rows based on the data in that row.
또한 보기: Html::renderTagAttributes() for details on how attributes are being rendered.
public $contentOptions

$deleteOptions 공개적으로 프로퍼티

HTML attributes for the delete action button. The following additional options are recognized: - label: _string_, the label for the delete action button. This is not html encoded. Defaults to Delete. - message: _string_, the delete confirmation message to display when the delete button is clicked. Defaults to Are you sure to delete this item?.
public $deleteOptions

$dropdown 공개적으로 프로퍼티

whether the action buttons are to be displayed as a dropdown
public $dropdown

$dropdownButton 공개적으로 프로퍼티

the dropdown button options. This configuration will be applicable only if [[dropdown]] is true. The following special options are recognized: - label: _string_', the button label to be displayed. Defaults to Actions. - caret: _string_', the caret symbol to be appended to the dropdown button. Defaults to .
public $dropdownButton

$dropdownMenu 공개적으로 프로퍼티

the HTML attributes for the Dropdown menu. Applicable if dropdown is true.
public $dropdownMenu

$dropdownOptions 공개적으로 프로퍼티

the HTML attributes for the Dropdown container. The class dropdown will be added. To align a dropdown at the right edge of the page container, you set the class to pull-right.
public $dropdownOptions

$hAlign 공개적으로 프로퍼티

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

$headerOptions 공개적으로 프로퍼티

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

$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

$updateOptions 공개적으로 프로퍼티

HTML attributes for the update action button. The following additional option is recognized: - label: _string_, the label for the update action button. This is not html encoded. Defaults to Update.
public $updateOptions

$vAlign 공개적으로 프로퍼티

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

$viewOptions 공개적으로 프로퍼티

HTML attributes for the view action button. The following additional option is recognized: label: _string_, the label for the view action button. This is not html encoded. Defaults to View.
public $viewOptions

$width 공개적으로 프로퍼티

the width of each column (matches the CSS width property).
또한 보기: http://www.w3schools.com/cssref/pr_dim_width.asp
public $width