UserPermissionsForm::submitForm(array &$form, FormStateInterface $form_state)
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
- core/modules/user/src/Form/UserPermissionsForm.php, line 195
 
Class
- UserPermissionsForm
 - Provides the user permissions administration form.
 
Namespace
Drupal\user\Form
Code
function submitForm(array &$form, FormStateInterface $form_state) {
  foreach ($form_state->getValue('role_names') as $role_name => $name) {
    user_role_change_permissions($role_name, (array) $form_state->getValue($role_name));
  }
  drupal_set_message($this->t('The changes have been saved.'));
}
Please login to continue.