modules/api/v2/controllers/ProductController.php
/**
     * Deletes an existing Product model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     * @throws NotFoundHttpException if the model cannot be found
     */
Deletes an existing Product model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
@throws NotFoundHttpException if the model cannot be found
Deletes an existing Product model . If deletion is successful the browser will be redirected to the ' index ' page . @param integer $id @return mixed @throws NotFoundHttpException if the model cannot be found
public function actionDelete($id)
    {
        $model = Product::findOne($id);
        if (!$model instanceof Product) {
            throw new NotFoundHttpException('Product doesn\'t exist.');
        }
        $model->status_id = ProductStatus::STATUS_ARCHIVED;
        $model->save(false);
    }
public function actionDelete ( $ id ) { $ model = Product :: findOne ( $ id ) ; if ( ! $ model instanceof Product ) { throw new NotFoundHttpException ( 'Product doesn\'t exist.' ) ; } $ model -> status_id = ProductStatus :: STATUS_ARCHIVED ; $ model -> save ( false ) ; }
Deletes an existing Product model.
Deletes an existing Product model .