muvo/yii2-column-stars

This is extension for display some values (like rating) as stars

Installs: 169

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

dev-master 2016-04-30 19:44 UTC

This package is not auto-updated.

Last update: 2022-11-26 08:57:51 UTC


README

Using as common widget

<?= Stars::widget(['value'=>3.5]) ?>

Using as data-column

<?= GridView::widget([
	'dataProvider' => …,
	'columns' => [
		<some column definitions>,
		[
			'class' => columns\StarColumn::className(),
			'attribute' => 'rating', /* In this example «rating» 
						attribute contains amount 
						of stars, which we need
						to display */
		],
	],
]) ?>