controllers/RuleController.php
public function actionDelete($name)
    {
        $rule = $this->findRule($name);

        $this->authManager->remove($rule);
        $this->authManager->invalidateCache();

        \Yii::$app->session->setFlash('success', \Yii::t('rbac', 'Rule has been removed'));

        return $this->redirect(['index']);
    }
public function actionDelete($name)
    {
        $rule = $this->findRule($name);

        $this->authManager->remove($rule);
        $this->authManager->invalidateCache();

        \Yii::$app->session->setFlash('success', \Yii::t('rbac', 'Rule has been removed'));

        return $this->redirect(['index']);
    }
public function actionDelete ( $ name ) { $ rule = $ this -> findRule ( $ name ) ; $ this -> authManager -> remove ( $ rule ) ; $ this -> authManager -> invalidateCache ( ) ; \ Yii :: $ app -> session -> setFlash ( 'success' , \ Yii :: t ( 'rbac' , 'Rule has been removed' ) ) ; return $ this -> redirect ( [ 'index' ] ) ; }
Removes rule.

@param  string $name
@return string
@throws NotFoundHttpException
Removes rule .