modules/admin/controllers/ProductController.php
/**
     * Deletes an existing Products 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 Products 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 Products 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 = $this->findModel($id);
        $model->status_id = ProductStatus::STATUS_ARCHIVED;
        $model->save(false);
        \Yii::$app->getSession()->setFlash(Growl::TYPE_SUCCESS, 'Product deleted successfully.');
        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ model = $ this -> findModel ( $ id ) ; $ model -> status_id = ProductStatus :: STATUS_ARCHIVED ; $ model -> save ( false ) ; \ Yii :: $ app -> getSession ( ) -> setFlash ( Growl :: TYPE_SUCCESS , 'Product deleted successfully.' ) ; return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Products model.
Deletes an existing Products model .