You are here

public function ChoosePdfStyleForm::submitForm in 3D Flipbook 8

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/ChoosePdfStyleForm.php, line 82

Class

ChoosePdfStyleForm
Configure custom settings for this site.

Namespace

Drupal\flipbook\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('config.flipbook_chooseconfig');
  $config
    ->set('pdf.choice', $form_state
    ->getValue('choice'));
  $config
    ->save();
  drupal_set_message($this
    ->t('Changes Saved'));
}