public function actionDelete($id)
    {
        if (($model = PaymentMethod::findOne($id)) !== null) {
            $model->delete();
            return $this->redirect(['index']);
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
public function actionDelete($id)
    {
        if (($model = PaymentMethod::findOne($id)) !== null) {
            $model->delete();
            return $this->redirect(['index']);
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
public function actionDelete ( $ id ) { if ( ( $ model = PaymentMethod :: findOne ( $ id ) ) !== null ) { $ model -> delete ( ) ; return $ this -> redirect ( [ 'index' ] ) ; } else { throw new NotFoundHttpException ( 'The requested page does not exist.' ) ; } }
Deletes an existing PaymentMethod model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
@throws NotFoundHttpException
Deletes an existing PaymentMethod model . If deletion is successful the browser will be redirected to the index page .