You are here

public function ParserOperationForm::submitForm in Markdown 8.2

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/ParserOperationForm.php, line 281

Class

ParserOperationForm
Provides a confirmation form to disable a parser.

Namespace

Drupal\markdown\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  if ($this->operation) {
    $url = static::createOperationUrl($this->parser, $this->operation);
  }
  else {
    $url = $this
      ->getCancelUrl();
  }
  $form_state
    ->setRedirectUrl($url);
}