function ReactionRuleAddForm::save

Overrides EntityForm::save

File

src/Form/ReactionRuleAddForm.php, line 63

Class

ReactionRuleAddForm
Provides a form to add a reaction rule.

Namespace

Drupal\rules\Form

Code

public function save(array $form, FormStateInterface $form_state) {
    parent::save($form, $form_state);
    $this->messenger()
        ->addMessage($this->t('Reaction rule %label has been created.', [
        '%label' => $this->entity
            ->label(),
    ]));
    $form_state->setRedirect('entity.rules_reaction_rule.edit_form', [
        'rules_reaction_rule' => $this->entity
            ->id(),
    ]);
}