You are here

public function SettingsForm::submitForm in Rules 8.3

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

tests/modules/rules_test_ui_embed/src/Form/SettingsForm.php, line 88

Class

SettingsForm
Implements the settings form.

Namespace

Drupal\rules_test_ui_embed\Form

Code

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);
}