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