src/controllers/LogController.php
public function actionDelete($id)
    {
        $ret = $this->findModel($id)->delete();
        if($ret === false)
        {
            Yii::$app->session->setFlash('error', Module::t('message', 'Failed to delete!') . ' (ID = '.$id.')');
        }else{
            Yii::$app->session->setFlash('success', Module::t('message', 'Successfully deleted.') . ' (ID = '.$id.')');
        }

        return $this->redirect(['index']);
    }
public function actionDelete($id)
    {
        $ret = $this->findModel($id)->delete();
        if($ret === false)
        {
            Yii::$app->session->setFlash('error', Module::t('message', 'Failed to delete!') . ' (ID = '.$id.')');
        }else{
            Yii::$app->session->setFlash('success', Module::t('message', 'Successfully deleted.') . ' (ID = '.$id.')');
        }

        return $this->redirect(['index']);
    }
public function actionDelete ( $ id ) { $ ret = $ this -> findModel ( $ id ) -> delete ( ) ; if ( $ ret === false ) { Yii :: $ app -> session -> setFlash ( 'error' , Module :: t ( 'message' , 'Failed to delete!' ) . ' (ID = ' . $ id . ')' ) ; } else { Yii :: $ app -> session -> setFlash ( 'success' , Module :: t ( 'message' , 'Successfully deleted.' ) . ' (ID = ' . $ id . ')' ) ; } return $ this -> redirect ( [ 'index' ] ) ; }
Deletes an existing Log model.
If deletion is successful, the browser will be redirected to the 'index' page.
@param integer $id
@return mixed
Deletes an existing Log model . If deletion is successful the browser will be redirected to the index page .