PHP Class yiister\grid\widgets\ProgressColumn

Inheritance: extends yii\grid\DataColumn
Mostrar archivo Open project: yiister/yii2-advanced-grid

Public Properties

Property Type Description
$isAnimated whether to animate the progress bar
$isStriped whether to stripe the progress bar
$maxValue the maximum attribute value
$minValue the minimum attribute value
$percent whether to show a percents instead of an attribute value
$progressBarClass the progress bar class You may set a fixed progress bar class for all rows via string or a dynamic class via callback. Callback function gets two parameters: ActiveRecord model and GridView column. Static class example: 'progressBarClass' => \yiister\grid\widgets\ProgressColumn::STYLE_DANGER, Dynamic class example: 'progressBarClass' => function ($model, $column) { return $model->{$column->attribute} > 15 ? \yiister\grid\widgets\ProgressColumn::STYLE_SUCCESS : \yiister\grid\widgets\ProgressColumn::STYLE_WARNING; },
$showText whether to show the text
$size the progress bar size

Public Methods

Method Description
init ( )

Protected Methods

Method Description
renderDataCellContent ( $model, $key, $index )

Method Details

init() public method

public init ( )

renderDataCellContent() protected method

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

Property Details

$isAnimated public_oe property

whether to animate the progress bar
public $isAnimated

$isStriped public_oe property

whether to stripe the progress bar
public $isStriped

$maxValue public_oe property

the maximum attribute value
public $maxValue

$minValue public_oe property

the minimum attribute value
public $minValue

$percent public_oe property

whether to show a percents instead of an attribute value
public $percent

$progressBarClass public_oe property

the progress bar class You may set a fixed progress bar class for all rows via string or a dynamic class via callback. Callback function gets two parameters: ActiveRecord model and GridView column. Static class example: 'progressBarClass' => \yiister\grid\widgets\ProgressColumn::STYLE_DANGER, Dynamic class example: 'progressBarClass' => function ($model, $column) { return $model->{$column->attribute} > 15 ? \yiister\grid\widgets\ProgressColumn::STYLE_SUCCESS : \yiister\grid\widgets\ProgressColumn::STYLE_WARNING; },
public $progressBarClass

$showText public_oe property

whether to show the text
public $showText

$size public_oe property

the progress bar size
public $size