Esempio n. 1
0
 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDisable()
 {
     $editResult = ProductService::disableProduct($_GET['id'], $_GET['is_dropped']);
     if ($editResult['status'] == CommonService::$ApiResult['SUCCESS']) {
         $this->redirect(array('index'));
     } else {
         $model->addErrors($editResult['detail']);
     }
 }