You are here

public function TrackDaFilesSettingsForm::submitForm in Track da files 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/TrackDaFilesSettingsForm.php, line 254

Class

TrackDaFilesSettingsForm
Configure book settings for this site.

Namespace

Drupal\track_da_files\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $config = $this
    ->config('track_da_files.settings');
  $config
    ->set('displays_datas', $values['displays_datas'])
    ->save();
  $config
    ->set('files_datas', $values['files_datas'])
    ->save();
  $config
    ->set('single_file_datas', $values['single_file_datas'])
    ->save();
  $config
    ->set('user_report_enabled', $values['user_report_enabled'])
    ->save();
  $config
    ->set('single_user_datas', $values['single_user_datas'])
    ->save();
  $config
    ->set('file_field_links_show_enabled', $values['file_field_links_show_enabled'])
    ->save();
  $config
    ->set('roles', $values['roles'])
    ->save();
  $config
    ->set('specific_roles', $values['specific_roles'])
    ->save();
  parent::submitForm($form, $form_state);
}