You are here

public function WkhtmltopdfConfig::submitForm in wkhtmltopdf 8

Same name and namespace in other branches
  1. 2.0.x src/Form/WkhtmltopdfConfig.php \Drupal\wkhtmltopdf\Form\WkhtmltopdfConfig::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 ConfigFormBase::submitForm

File

src/Form/WkhtmltopdfConfig.php, line 62

Class

WkhtmltopdfConfig
Defines wkhtmltopdf form configuration.

Namespace

Drupal\wkhtmltopdf\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('wkhtmltopdf.settings')
    ->set('wkhtmltopdf_bin', $form_state
    ->getValue('wkhtmltopdf_bin'))
    ->set('wkhtmltopdf_zoom', $form_state
    ->getValue('wkhtmltopdf_zoom'))
    ->set('wkhtmltopdf_download', $form_state
    ->getValue('wkhtmltopdf_download'))
    ->save();
  parent::submitForm($form, $form_state);
}