modules/admin/controllers/PromoCodeController.php
/**
     * Deletes an existing PromoCode 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 PromoCode 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 PromoCode 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);
         if ($model->delete()) {
            Yii::$app->session->setFlash(Growl::TYPE_SUCCESS, "Promo code deleted successfully.");
        } else {
            Yii::$app->session->setFlash(Growl::TYPE_DANGER, "Error while deleting Promo code.");
        }
        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ model = $ this -> findModel ( $ id ) ; if ( $ model -> delete ( ) ) { Yii :: $ app -> session -> setFlash ( Growl :: TYPE_SUCCESS , " Promo code deleted successfully. " ) ; } else { Yii :: $ app -> session -> setFlash ( Growl :: TYPE_DANGER , " Error while deleting Promo code. " ) ; } return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing PromoCode model.
Deletes an existing PromoCode model .