/**
  * Remove a user group backend
  */
 public function removeAction()
 {
     $backendName = $this->params->getRequired('backend');
     $backendForm = new UserGroupBackendForm();
     $backendForm->setIniConfig(Config::app('groups'));
     $form = new ConfirmRemovalForm();
     $form->setRedirectUrl('usergroupbackend/list');
     $form->setOnSuccess(function (ConfirmRemovalForm $form) use($backendName, $backendForm) {
         try {
             $backendForm->delete($backendName);
         } catch (Exception $e) {
             $form->error($e->getMessage());
             return false;
         }
         if ($backendForm->save()) {
             Notification::success(sprintf(t('User group backend "%s" successfully removed'), $backendName));
             return true;
         }
         return false;
     });
     $form->handleRequest();
     $this->renderForm($form, $this->translate('Remove User Group Backend'));
 }