You are here

public function AdsTxtAdminSettingsForm::submitForm in AdsTxt 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/AdsTxtAdminSettingsForm.php, line 55

Class

AdsTxtAdminSettingsForm
Configure adstxt settings for this site.

Namespace

Drupal\adstxt\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('adstxt.settings');
  $config
    ->set('content', $form_state
    ->getValue('adstxt_content'))
    ->set('app_content', $form_state
    ->getValue('app_adstxt_content'))
    ->save();
  parent::submitForm($form, $form_state);
}