public function UserRoleDelete::submitForm

Form submission handler.

Parameters

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

array $form_state: An associative array containing the current state of the form.

Overrides FormInterface::submitForm

File

drupal/core/modules/user/lib/Drupal/user/Form/UserRoleDelete.php, line 66
Contains \Drupal\user\Form\UserRoleDelete.

Class

UserRoleDelete
Provides a deletion confirmation form for Role entity.

Namespace

Drupal\user\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $this->role
    ->delete();
  watchdog('user', 'Role %name has been deleted.', array(
    '%name' => $this->role
      ->label(),
  ));
  drupal_set_message(t('Role %name has been deleted.', array(
    '%name' => $this->role
      ->label(),
  )));
  $form_state['redirect'] = 'admin/people/roles';
}