lugaru
(E Daechert)
May 2, 2013, 11:26am
1
Hey,
I’m using Yii 1.1.13 and PHP 5.2.12 unfortunatley i cannot upgrade to php 5.3 at the Moment.
I need the listdata in a kind of:
CHtml::listData(User::model()->findAll($criteria),"id","functionxyz('01.01.2013')","functionTwo('attribute')");
Is there a way to achieve this without PHP 5.3?
The first Function needs a date to be compared and the second one just an ID.
I can’t use the Criteria for this, because my function returns additional Information for the User Depending on another Table. It count’s the Entries for a given Month.
Somebody got an Idea?
Thanks!
Keith
(Kburton)
May 2, 2013, 12:03pm
2
Instead of using CHtml::listData(), it might be easier to create a static method in the model to return the data in the required format.
public static function getSelectOptions()
{
// build and return array here
}
lugaru
(E Daechert)
May 3, 2013, 9:09am
3
Baah, stupid me, sure! Thank you!
Keith:
Instead of using CHtml::listData(), it might be easier to create a static method in the model to return the data in the required format.
public static function getSelectOptions()
{
// build and return array here
}