submitExposeForm example



  /** * Simple submit handler. */
  public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    // Do not store this values.     $form_state->unsetValue('expose_button');

    $this->sortSubmit($form$form_state);
    if (!empty($this->options['exposed'])) {
      $this->submitExposeForm($form$form_state);
    }
  }

  /** * Shortcut to display the value form. */
  protected function showSortForm(&$form, FormStateInterface $form_state) {
    $options = $this->sortOptions();
    if (!empty($options)) {
      $form['order'] = [
        '#title' => $this->t('Order', []['context' => 'Sort order']),
        

  public function submitOptionsForm(&$form, FormStateInterface $form_state) {
    // Do not store these values.     $form_state->unsetValue('expose_button');
    $form_state->unsetValue('group_button');

    if (!$this->isAGroup()) {
      $this->operatorSubmit($form$form_state);
      $this->valueSubmit($form$form_state);
    }
    if (!empty($this->options['exposed'])) {
      $this->submitExposeForm($form$form_state);
    }
    if ($this->isAGroup()) {
      $this->buildGroupSubmit($form$form_state);
    }
  }

  /** * Shortcut to display the operator form. */
  public function showOperatorForm(&$form, FormStateInterface $form_state) {
    $this->operatorForm($form$form_state);
    
Home | Imprint | This part of the site doesn't use cookies.