You are here

public function ManageDialog::validateForm in TacJS 8.4

Same name and namespace in other branches
  1. 8.6 src/Form/Steps/ManageDialog.php \Drupal\tacjs\Form\Steps\ManageDialog::validateForm()
  2. 8.3 src/Form/Steps/ManageDialog.php \Drupal\tacjs\Form\Steps\ManageDialog::validateForm()
  3. 8.5 src/Form/Steps/ManageDialog.php \Drupal\tacjs\Form\Steps\ManageDialog::validateForm()

Form validation 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 FormBase::validateForm

File

src/Form/Steps/ManageDialog.php, line 166

Class

ManageDialog
Class ManageDialog.

Namespace

Drupal\tacjs\Form\Steps

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $form_state
    ->setValue('showAlertSmall', $form_state
    ->getValue('showAlertSmall') ? TRUE : FALSE)
    ->setValue('cookieslist', $form_state
    ->getValue('cookieslist') ? TRUE : FALSE)
    ->setValue('adblocker', $form_state
    ->getValue('adblocker') ? TRUE : FALSE)
    ->setValue('AcceptAllCta', $form_state
    ->getValue('AcceptAllCta') ? TRUE : FALSE)
    ->setValue('highPrivacy', $form_state
    ->getValue('highPrivacy') ? TRUE : FALSE)
    ->setValue('handleBrowserDNTRequest', $form_state
    ->getValue('handleBrowserDNTRequest') ? TRUE : FALSE)
    ->setValue('removeCredit', $form_state
    ->getValue('removeCredit') ? TRUE : FALSE)
    ->setValue('moreInfoLink', $form_state
    ->getValue('moreInfoLink') ? TRUE : FALSE)
    ->setValue('useExternalCss', $form_state
    ->getValue('useExternalCss') ? TRUE : FALSE)
    ->setValue('useExternalJs', $form_state
    ->getValue('useExternalJs') ? TRUE : FALSE);
  parent::validateForm($form, $form_state);
}