You are here

public function PdfLinksConfigurationForm::submitForm in Printer and PDF versions for Drupal 8+ 8

Same name and namespace in other branches
  1. 2.x src/Form/PdfLinksConfigurationForm.php \Drupal\printable\Form\PdfLinksConfigurationForm::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 FormInterface::submitForm

File

src/Form/PdfLinksConfigurationForm.php, line 94

Class

PdfLinksConfigurationForm
Provides shared configuration form for all printable formats.

Namespace

Drupal\printable\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('printable.settings')
    ->set('printable_pdf_link_locations', $form_state
    ->getValue('print_pdf_link_pos'))
    ->save();
  drupal_set_message('The configuration option has been saved', 'status');
}