function RulesComponentAddForm::save

Overrides EntityForm::save

File

src/Form/RulesComponentAddForm.php, line 43

Class

RulesComponentAddForm
Provides a form to add a component.

Namespace

Drupal\rules\Form

Code

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