You are here

public function TreeERSelection::buildOptionsForm in Views tree 8.2

Render the given style.

Overrides Tree::buildOptionsForm

File

src/Plugin/views/style/TreeERSelection.php, line 36

Class

TreeERSelection
Style plugin to render each item as hierarchy.

Namespace

Drupal\views_tree\Plugin\views\style

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $options = $this->displayHandler
    ->getFieldLabels(TRUE);
  $form['search_fields'] = [
    '#type' => 'checkboxes',
    '#title' => $this
      ->t('Search fields'),
    '#options' => $options,
    '#required' => TRUE,
    '#default_value' => $this->options['search_fields'],
    '#description' => $this
      ->t('Select the field(s) that will be searched when using the autocomplete widget.'),
    '#weight' => -3,
  ];
}