You are here

public function SettingsForm::submitForm in Entity Share Cron 8

Same name and namespace in other branches
  1. 8.2 src/Form/SettingsForm.php \Drupal\entity_share_cron\Form\SettingsForm::submitForm()
  2. 3.0.x src/Form/SettingsForm.php \Drupal\entity_share_cron\Form\SettingsForm::submitForm()

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

src/Form/SettingsForm.php, line 207

Class

SettingsForm
Module settings form.

Namespace

Drupal\entity_share_cron\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('entity_share_cron.settings')
    ->set('cron_interval', $form_state
    ->getValue('cron_interval'))
    ->set('remotes', $form_state
    ->getValue('remotes'))
    ->save();
  parent::submitForm($form, $form_state);
}