You are here

public function PDFGenerationConfigForm::submitForm in Forena Reports 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

forena_pdf/src/Form/PDFGenerationConfigForm.php, line 118

Class

PDFGenerationConfigForm

Namespace

Drupal\forena_pdf\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('forena_pdf.settings')
    ->set('prince_path', $values['prince_path'])
    ->set('disable_links', $values['disable_links'])
    ->set('docraptor_url', $values['docraptor_url'])
    ->set('docraptor_test', $values['docraptor_test'])
    ->set('docraptor_key', $values['docraptor_key'])
    ->save();

  // Call Configuration form to save changes.
  parent::submitForm($form, $form_state);
}