urmaul/yii-selectcolumn

SelectColumn for Yii CGridView.

Installs: 29

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/urmaul/yii-selectcolumn

v1.0.1 2014-11-19 16:59 UTC

This package is not auto-updated.

Last update: 2025-09-27 21:26:10 UTC


README

SelectColumn for Yii CGridView. It replaces cell content with label from map. And it sets that map as dropdown filter.

Installing

composer require urmaul/yii-selectcolumn dev-master

Using

First, add this line to imports config:

'import'=>array(
	...
	'SelectColumn',
	...
),

Using with enum attributes

Works great with EnumAttributes behavior.

array(
	'class' => 'SelectColumn',
	'name' => 'status',
	'labels' => $model->statusEnum->valueLabels,
),

Using with relations

Works great with ListData behavior.

array(
	'class' => 'SelectColumn',
	'name' => 'category_id',
	'labels' => Category::model()->listData,
),