public function actionDelete($id)
    {
        $model = $this->findModel($id);
        
        if ($model->is_active == false) {
            $model->delete();
            Yii::$app->session->setFlash('success', Yii::t($this->tcModule,"Module has been deleted"));
        } else {
            Yii::$app->session->setFlash('error', Yii::t($this->tcModule,"Can't delete active module"));
        }

        $params = Yii::$app->request->getQueryParams();
        $params['id'] = $model->id;
        $params[] = 'index';
        return $this->redirect($params);
    }