You are here

public function FileSystemForm::submitForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Form/FileSystemForm.php \Drupal\system\Form\FileSystemForm::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

core/modules/system/src/Form/FileSystemForm.php, line 145
Contains \Drupal\system\Form\FileSystemForm.

Class

FileSystemForm
Configure file system settings for this site.

Namespace

Drupal\system\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('system.file')
    ->set('path.temporary', $form_state
    ->getValue('file_temporary_path'))
    ->set('temporary_maximum_age', $form_state
    ->getValue('temporary_maximum_age'));
  if ($form_state
    ->hasValue('file_default_scheme')) {
    $config
      ->set('default_scheme', $form_state
      ->getValue('file_default_scheme'));
  }
  $config
    ->save();
  parent::submitForm($form, $form_state);
}