You are here

public function SimplesitemapSettingsForm::submitForm in Simple XML sitemap 8

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/SimplesitemapSettingsForm.php, line 93
Contains \Drupal\simplesitemap\Form\SimplesitemapSettingsForm.

Class

SimplesitemapSettingsForm
SimplesitemapSettingsFrom

Namespace

Drupal\simplesitemap\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $sitemap = new Simplesitemap();
  $sitemap
    ->save_setting('max_links', $form_state
    ->getValue('max_links'));
  $sitemap
    ->save_setting('cron_generate', $form_state
    ->getValue('cron_generate'));
  parent::submitForm($form, $form_state);
}