function DeleteExpressionForm::submitForm

Overrides FormInterface::submitForm

File

src/Form/DeleteExpressionForm.php, line 78

Class

DeleteExpressionForm
Removes an expression from a rule.

Namespace

Drupal\rules\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $component = $this->rulesUiHandler
        ->getComponent();
    $component->getExpression()
        ->deleteExpression($this->uuid);
    $this->rulesUiHandler
        ->updateComponent($component);
    $form_state->setRedirectUrl($this->getCancelUrl());
}