You are here

public function RoleDeleteForm::submitForm in Ubercart 8.4

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

uc_role/src/Form/RoleDeleteForm.php, line 92

Class

RoleDeleteForm
Form builder for role expirations.

Namespace

Drupal\uc_role\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  uc_role_delete(User::load($form_state
    ->getValue('uid')), $form_state
    ->getValue('rid'));
  $form_state
    ->setRedirect('uc_role.expiration');
}