You are here

public function JsonApiImageStylesAdminForm::submitForm in JSON:API Image Styles 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/JsonApiImageStylesAdminForm.php \Drupal\jsonapi_image_styles\Form\JsonApiImageStylesAdminForm::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/JsonApiImageStylesAdminForm.php, line 86

Class

JsonApiImageStylesAdminForm
Provides an admin form for modifying the module configuration.

Namespace

Drupal\jsonapi_image_styles\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) : void {
  parent::submitForm($form, $form_state);
  $this
    ->config('jsonapi_image_styles.settings')
    ->set('image_styles', $form_state
    ->getValue('image_styles'))
    ->save();
}