You are here

public function PrintFormat::submitConfigurationForm in Printer and PDF versions for Drupal 8+ 8

Same name and namespace in other branches
  1. 2.x src/Plugin/PrintableFormat/PrintFormat.php \Drupal\printable\Plugin\PrintableFormat\PrintFormat::submitConfigurationForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides PluginFormInterface::submitConfigurationForm

File

src/Plugin/PrintableFormat/PrintFormat.php, line 58

Class

PrintFormat
Provides a plugin to display a printable version of a page.

Namespace

Drupal\printable\Plugin\PrintableFormat

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this
    ->setConfiguration([
    'show_print_dialogue' => $form_state
      ->getValue('show_print_dialogue'),
  ]);
  $this
    ->blockSubmit($form, $form_state);
}