Код: Выделить всё
public function actionIndex() {
$dataProvider = new CActiveDataProvider('Measure');
$this->render('index', array(
'dataProvider' => $dataProvider,
));
}
public function actionView($id) {
$this->render('view', array(
'model' => $this->loadModel($id),
));
}
public function loadModel($id) {
$model = Measure::model()->findByPK($id);
if ($model === null) {
throw new CHttpException(404, 'The requested page does not exist.');
}
return $model;
}
Код: Выделить всё
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'ME_ID',
'ME',
'DIR',
'BEGIN',
'END',
),
));