gposse
(Gposse)
1
It would be nice for CHtml::listData to have additional optional arguments when you want to add non db rows to the list.
An example would be:
$data=CHtml::listData(object::model()->findAll(),‘ID’,‘DESCRIPCION’,array(NULL=>’<No data>’),CHtml::LIST_START);
besnik
(Besnik78)
2
Why not use something similar to the following:
$data = CMap::mergeArray(array(0=>’<No data>’),CHtml::listData(object::model()->findAll(),‘ID’,‘DESCRIPCION’) );
Note: not sure about using the NULL constant. Using 0 or "" will be more explicit.