Esempio n. 1
0
	/**
	* Generate array for dropdown list to use in child form.
	* @return array $_items
	*/
	public static function items()
	{
	    self::$_items = CHtml::listData(self::model()->findAll(), 'user_type_id', 'user_type_name');
	    return self::$_items;
	} 
Esempio n. 2
0
 private static function loadItems()
 {
     self::$_items = array();
     $models = self::model()->findAll();
     foreach ($models as $model) {
         self::$_items[$model->user_type_id] = $model->user_type_name;
     }
 }