PHP Класс yii2tech\admin\grid\PositionColumn

См. также: https://github.com/yii2tech/ar-position
С версии: 1.0
Автор: Paul Klimov ([email protected])
Наследование: extends yii\grid\DataColumn
Показать файл Открыть проект

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

Свойство Тип Описание
$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