modules/api/v1/controllers/ColorController.php
/**
     * Displays a single Color model.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Displays a single Color model.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Displays a single Color model . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionView($id)
    {
        $model = Color::findOne($id);
        if (!$model instanceof Color) {
            throw new NotFoundHttpException('Color doesn\'t exist.');
        }
        return $model;
    }
public function actionView ( $ id ) { $ model = Color :: findOne ( $ id ) ; if ( ! $ model instanceof Color ) { throw new NotFoundHttpException ( 'Color doesn\'t exist.' ) ; } return $ model ; }
Displays a single Color model.
Displays a single Color model .