src/controllers/RbacManageController.php
public function actionDelete($id, $type, $returnUrl = '')
    {
        self::checkPermissions($type);
        if (true === Yii::$app->getAuthManager()->remove(new Item(['name' => $id]))) {
            Yii::$app->session->setFlash(
                'info',
                Yii::t('users', "Item successfully removed")
            );
        } else {
            Yii::$app->session->setFlash(
                'warning',
                Yii::t('users', "Unknown RBAC item name '{name}'", ['name' => $id])
            );
        }
        $returnUrl = empty($returnUrl) ? ['/users/rbac-manage/index', 'type' => $type] : $returnUrl;
        return $this->redirect($returnUrl);
    }
public function actionDelete($id, $type, $returnUrl = '')
    {
        self::checkPermissions($type);
        if (true === Yii::$app->getAuthManager()->remove(new Item(['name' => $id]))) {
            Yii::$app->session->setFlash(
                'info',
                Yii::t('users', "Item successfully removed")
            );
        } else {
            Yii::$app->session->setFlash(
                'warning',
                Yii::t('users', "Unknown RBAC item name '{name}'", ['name' => $id])
            );
        }
        $returnUrl = empty($returnUrl) ? ['/users/rbac-manage/index', 'type' => $type] : $returnUrl;
        return $this->redirect($returnUrl);
    }
public function actionDelete ( $ id , $ type , $ returnUrl = '' ) { self :: checkPermissions ( $ type ) ; if ( true === Yii :: $ app -> getAuthManager ( ) -> remove ( new Item ( [ 'name' => $ id ] ) ) ) { Yii :: $ app -> session -> setFlash ( 'info' , Yii :: t ( 'users' , "Item successfully removed" ) ) ; } else { Yii :: $ app -> session -> setFlash ( 'warning' , Yii :: t ( 'users' , "Unknown RBAC item name '{name}'" , [ 'name' => $ id ] ) ) ; } $ returnUrl = empty ( $ returnUrl ) ? [ '/users/rbac-manage/index' , 'type' => $ type ] : $ returnUrl ; return $ this -> redirect ( $ returnUrl ) ; }
Deletes an existing RBAC Item model.

@param integer $id
@param $type
@param string $returnUrl
@return mixed
@throws ForbiddenHttpException
Deletes an existing RBAC Item model .