public function UserMenuAvatarConfigurationForm::submitForm in User Menu Avatar (User Image in Menu) 8
Same name and namespace in other branches
- 8.5 src/Form/UserMenuAvatarConfigurationForm.php \Drupal\user_menu_avatar\Form\UserMenuAvatarConfigurationForm::submitForm()
- 8.2 src/form/UserMenuAvatarConfigurationForm.php \Drupal\user_menu_avatar\Form\UserMenuAvatarConfigurationForm::submitForm()
- 8.3 src/Form/UserMenuAvatarConfigurationForm.php \Drupal\user_menu_avatar\Form\UserMenuAvatarConfigurationForm::submitForm()
- 8.4 src/Form/UserMenuAvatarConfigurationForm.php \Drupal\user_menu_avatar\Form\UserMenuAvatarConfigurationForm::submitForm()
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 ConfigFormBase::submitForm
File
- src/
form/ UserMenuAvatarConfigurationForm.php, line 151
Class
- UserMenuAvatarConfigurationForm
- Defines our form class.
Namespace
Drupal\user_menu_avatar\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this
->config('user_menu_avatar.user_menu_avatar_settings')
->set('avatar_shape', $values['avatar_shape']);
$this
->config('user_menu_avatar.user_menu_avatar_settings')
->set('avatar_size', $values['avatar_size']);
$this
->config('user_menu_avatar.user_menu_avatar_settings')
->set('avatar_custom_image_field', $values['avatar_custom_image_field']);
$this
->config('user_menu_avatar.user_menu_avatar_settings')
->set('avatar_show_picture_and_name', $values['avatar_show_picture_and_name'])
->save();
parent::submitForm($form, $form_state);
}