original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Deletes an existing RBAC Item model.
  
  @param integer $id
  @param $type
  @param string $returnUrl
  @return mixed
  @throws ForbiddenHttpException
docstring_tokens: Deletes an existing RBAC Item model .