You are here

public function FileMimeConfigForm::submitForm in File MIME 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/FileMimeConfigForm.php, line 49

Class

FileMimeConfigForm
Implements the file MIME config form.

Namespace

Drupal\filemime\Form

Code

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