public static function getUserTypes(){
return array(
'10'=> 'admin',
'5'=> 'Doctor',
'4'=> 'Accountant',
'3'=> 'Pharmacist',
'2'=> 'Nurse',
'1'=> 'Patient',
'0'=> 'No User',
);
}
array('name'=>'role', 'value'=>$model->UserTypes[$model->role]),
OR
$services = array('1' => 'Airport Rates', '2' => 'Station Rates', '3' => 'Local Rates');
array(
'name' => 'services_place',
'value' => $model->services_place ? $services[$model->services_place]:"",
// 'value' => $model->services_place?$data->getStatus($model->services_place):"",
),
public function getStatus($services_place)
{
$data = array('1' => 'Airport Rates', '2' => 'Station Rates', '3' => 'Local Rates');
return $data[$services_place];
}