sortValidate example

'#value' => $this->t('Hide sort'),
        '#submit' => [[$this, 'displayExposedForm']],
      ];
      $form['expose_button']['checkbox']['checkbox']['#default_value'] = 1;
    }
  }

  /** * Simple validate handler. */
  public function validateOptionsForm(&$form, FormStateInterface $form_state) {
    $this->sortValidate($form$form_state);
    if (!empty($this->options['exposed'])) {
      $this->validateExposeForm($form$form_state);
    }

  }

  /** * Simple submit handler. */
  public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    // Do not store this values.
Home | Imprint | This part of the site doesn't use cookies.