You are here

public function SearchFileAttachmentsSettingsForm::submitForm in Search File Attachments 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/SearchFileAttachmentsSettingsForm.php, line 127

Class

SearchFileAttachmentsSettingsForm
Configure search file attachments settings.

Namespace

Drupal\search_file_attachments\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('search_file_attachments.settings')
    ->set('tika.path', rtrim($form_state
    ->getValue('search_file_attachments_tika_path'), '/'))
    ->set('tika.jar', $form_state
    ->getValue('search_file_attachments_tika_jar'))
    ->set('java_path', $form_state
    ->getValue('search_file_attachments_java_path'))
    ->set('files.include', $form_state
    ->getValue('search_file_attachments_include'))
    ->set('debug', $form_state
    ->getValue('search_file_attachments_debug'))
    ->save();
  parent::submitForm($form, $form_state);
}