PHP Class yiister\grid\widgets\ProgressColumn

Inheritance: extends yii\grid\DataColumn
Show file 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 property

whether to animate the progress bar
public $isAnimated

$isStriped public property

whether to stripe the progress bar
public $isStriped

$maxValue public property

the maximum attribute value
public $maxValue

$minValue public property

the minimum attribute value
public $minValue

$percent public property

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

$progressBarClass public 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 property

whether to show the text
public $showText

$size public property

the progress bar size
public $size