function JsonApiSettingsForm::submitForm

Same name in other branches
  1. 8.9.x core/modules/jsonapi/src/Form/JsonApiSettingsForm.php \Drupal\jsonapi\Form\JsonApiSettingsForm::submitForm()

Overrides ConfigFormBase::submitForm

File

core/modules/jsonapi/src/Form/JsonApiSettingsForm.php, line 52

Class

JsonApiSettingsForm
Configure JSON:API settings for this site.

Namespace

Drupal\jsonapi\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $this->config('jsonapi.settings')
        ->set('read_only', $form_state->getValue('read_only') === 'r')
        ->save();
    parent::submitForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.