Exemplo n.º 1
0
 public function loadModel($id)
 {
     $model = TypeCar::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 2
0
 public static function typeCars()
 {
     return CHtml::listData(TypeCar::model()->findAll(), 'type_car', 'name');
 }
 public function actionIndex()
 {
     $model = TypeCar::model()->findAll();
     $this->render('index', array('model' => $model));
 }