My view code
<?php $this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'id',
'eventstype',
'visibility',
'enable',
),
)); ?>
controller code
public function actionView($id)
{
$model = ManageEventsType::model()->findByAttributes(array("id" => $id));
if($model){
$this->render("view", array(
"model" => $model
));
}
}
in my view page the records display like following
Id 3
Eventstype Holiday
Visibility 2
Enable 0
i want to display visibility as enable or disable . 1- enable , 2- Disable , any idea