Example #1
0
 /**
  * {@inheritdoc}
  */
 public function submitForm(array &$form, FormStateInterface $form_state)
 {
     $this->rulesUiHandler->getForm()->submitForm($form['conditions'], $form_state);
     $this->config('rules_test_ui_embed.settings')->set('css.0.file', $form_state->getValue('css_file'))->save();
     // Also remove the temporarily stored component, it has been persisted now.
     $this->rulesUiHandler->clearTemporaryStorage();
     parent::submitForm($form, $form_state);
 }
 /**
  * {@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()]));
 }