PHP 클래스 yii2tech\admin\grid\PositionColumn

또한 보기: https://github.com/yii2tech/ar-position
부터: 1.0
저자: Paul Klimov ([email protected])
상속: extends yii\grid\DataColumn
파일 보기 프로젝트 열기: yii2tech/admin

공개 프로퍼티들

프로퍼티 타입 설명
$buttonOptions html options to be applied to the [[initDefaultButtons()|default buttons]].
$buttons configuration for the switch position buttons.
$headerOptions
$positionParam name of the query param, which is used for new position specification.
$route route to the action, which should process position switching, for example: 'item/position'.
$template the template that is used to render the content in each cell. These default tokens are recognized: {first}, {prev}, {next}, {last} and {value}.
$urlCreator a callback that creates a button URL using the specified model information. The signature of the callback should be the same as that of PositionColumn::createUrl. If this property is not set, button URLs will be created using PositionColumn::createUrl.

공개 메소드들

메소드 설명
createUrl ( string $position, BaseActiveRecord $model, mixed $key, integer $index ) : string Creates a URL for the given position and model.
init ( )

보호된 메소드들

메소드 설명
initDefaultButtons ( ) Initializes the default buttons.
renderButton ( string $name, mixed $model, string $key, integer $index ) : string Renders button.
renderDataCellContent ( $model, $key, $index )

메소드 상세

createUrl() 공개 메소드

This method is called for each button and each row.
public createUrl ( string $position, BaseActiveRecord $model, mixed $key, integer $index ) : string
$position string the position name
$model yii\db\BaseActiveRecord the data model
$key mixed the key associated with the data model
$index integer the current row index
리턴 string the created URL

init() 공개 메소드

public init ( )

initDefaultButtons() 보호된 메소드

Initializes the default buttons.
protected initDefaultButtons ( )

renderButton() 보호된 메소드

Renders button.
protected renderButton ( string $name, mixed $model, string $key, integer $index ) : string
$name string button name.
$model mixed
$key string
$index integer
리턴 string rendered HTML

renderDataCellContent() 보호된 메소드

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

프로퍼티 상세

$buttonOptions 공개적으로 프로퍼티

html options to be applied to the [[initDefaultButtons()|default buttons]].
public $buttonOptions

$buttons 공개적으로 프로퍼티

configuration for the switch position buttons.
public $buttons

$headerOptions 공개적으로 프로퍼티

public $headerOptions

$positionParam 공개적으로 프로퍼티

name of the query param, which is used for new position specification.
public $positionParam

$route 공개적으로 프로퍼티

route to the action, which should process position switching, for example: 'item/position'.
public $route

$template 공개적으로 프로퍼티

the template that is used to render the content in each cell. These default tokens are recognized: {first}, {prev}, {next}, {last} and {value}.
public $template

$urlCreator 공개적으로 프로퍼티

a callback that creates a button URL using the specified model information. The signature of the callback should be the same as that of PositionColumn::createUrl. If this property is not set, button URLs will be created using PositionColumn::createUrl.
public $urlCreator