PHP code example of urmaul / yii-selectcolumn

1. Go to this page and download the library: Download urmaul/yii-selectcolumn library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

urmaul / yii-selectcolumn example snippets


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

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

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