You are here

public function ApiSettingsForm::submitForm in Facebook Instant Articles 3.x

Same name and namespace in other branches
  1. 8.2 src/Form/ApiSettingsForm.php \Drupal\fb_instant_articles\Form\ApiSettingsForm::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/ApiSettingsForm.php, line 449

Class

ApiSettingsForm
Facebook Instant Articles API form.

Namespace

Drupal\fb_instant_articles\Form

Code

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