public function run($id)
    {
        $model = $this->controller->findModel($id);
        if ($model->is_system) {
            \Yii::$app->session->setFlash('warning', \Yii::t('app', 'You cannot update or delete system handlers'));
        } else {
            $model->delete();
        }
        return $this->controller->redirect(['index']);
    }
public function run($id)
    {
        $model = $this->controller->findModel($id);
        if ($model->is_system) {
            \Yii::$app->session->setFlash('warning', \Yii::t('app', 'You cannot update or delete system handlers'));
        } else {
            $model->delete();
        }
        return $this->controller->redirect(['index']);
    }
public function run ( $ id ) { $ model = $ this -> controller -> findModel ( $ id ) ; if ( $ model -> is_system ) { \ Yii :: $ app -> session -> setFlash ( 'warning' , \ Yii :: t ( 'app' , 'You cannot update or delete system handlers' ) ) ; } else { $ model -> delete ( ) ; } return $ this -> controller -> redirect ( [ 'index' ] ) ; }
Deletes an existing EventEventHandler model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
Deletes an existing EventEventHandler model . If deletion is successful the browser will be redirected to the index page .