/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { $this->rulesUiHandler->getForm()->submitForm($form, $form_state); // Persist changes by saving the entity. parent::save($form, $form_state); // Also remove the temporarily stored component, it has been persisted now. $this->rulesUiHandler->clearTemporaryStorage(); drupal_set_message($this->t('Rule component %label has been updated.', ['%label' => $this->entity->label()])); }
/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { parent::save($form, $form_state); drupal_set_message($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()]); }
/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { parent::save($form, $form_state); // Also remove the temporarily stored rule, it has been persisted now. $this->deleteFromTempStore(); // After the reaction rule is saved, we need to rebuild the container, // otherwise the reaction rule will not fire. However, we can do an // optimization: if our generic event subscriber is already registered to // the event in the kernel/container then we don't need to rebuild. if (!$this->isRuleEventRegistered()) { $this->drupalKernel->rebuildContainer(); } drupal_set_message($this->t('Reaction rule %label has been updated.', ['%label' => $this->entity->label()])); }
/** * {@inheritdoc} */ public function save(array $form, FormStateInterface $form_state) { parent::save($form, $form_state); drupal_set_message($this->t('Component %label has been updated.', ['%label' => $this->entity->label()])); }