public function FileSystemForm::submitForm

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides SystemConfigFormBase::submitForm

File

drupal/core/modules/system/lib/Drupal/system/Form/FileSystemForm.php, line 77
Contains \Drupal\system\Form\FileSystemForm.

Class

FileSystemForm
Configure file system settings for this site.

Namespace

Drupal\system\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $config = $this->configFactory
    ->get('system.file')
    ->set('path.private', $form_state['values']['file_private_path'])
    ->set('path.temporary', $form_state['values']['file_temporary_path']);
  variable_set('file_public_path', $form_state['values']['file_public_path']);
  if (isset($form_state['values']['file_default_scheme'])) {
    $config
      ->set('default_scheme', $form_state['values']['file_default_scheme']);
  }
  $config
    ->save();
  parent::submitForm($form, $form_state);
}