showSortForm example



  /** * Basic options for all sort criteria. */
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form$form_state);
    if ($this->canExpose()) {
      $this->showExposeButton($form$form_state);
    }
    $form['op_val_start'] = ['#value' => '<div class="clearfix">'];
    $this->showSortForm($form$form_state);
    $form['op_val_end'] = ['#value' => '</div>'];
    if ($this->canExpose()) {
      $this->showExposeForm($form$form_state);
    }
  }

  /** * Shortcut to display the expose/hide button. */
  public function showExposeButton(&$form, FormStateInterface $form_state) {
    $form['expose_button'] = [
      
Home | Imprint | This part of the site doesn't use cookies.