You are here

public function PhantomJSCaptureSettingsForm::submitForm in PhantomJS Capture 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/PhantomJSCaptureSettingsForm.php, line 112

Class

PhantomJSCaptureSettingsForm
Class PhantomJSCaptureSettingsForm

Namespace

Drupal\phantomjs_capture\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('phantomjs_capture.settings')
    ->set('binary', $values['binary'])
    ->set('destination', $values['destination'])
    ->set('script', $values['script'])
    ->save();
  parent::submitForm($form, $form_state);
}