You are here

public function Tree::buildOptionsForm in Views tree 8.2

Render the given style.

Overrides HtmlList::buildOptionsForm

1 call to Tree::buildOptionsForm()
TreeERSelection::buildOptionsForm in src/Plugin/views/style/TreeERSelection.php
Render the given style.
1 method overrides Tree::buildOptionsForm()
TreeERSelection::buildOptionsForm in src/Plugin/views/style/TreeERSelection.php
Render the given style.

File

src/Plugin/views/style/Tree.php, line 59

Class

Tree
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);
  $this
    ->getCommonOptionsForm($form, $form_state);
  $events = [
    'click' => $this
      ->t('On Click'),
    'mouseover' => $this
      ->t('On Mouseover'),
  ];
  $form['type']['#description'] = $this
    ->t('Whether to use an ordered or unordered list for the retrieved items. Most use cases will prefer Unordered.');

  // Unused by the views tree list style at this time.
  unset($form['wrapper_class']);
  unset($form['class']);
  $form['collapsible_tree'] = [
    '#type' => 'radios',
    '#title' => $this
      ->t('Collapsible view'),
    '#default_value' => $this->options['collapsible_tree'],
    '#options' => [
      0 => $this
        ->t('Off'),
      'expanded' => $this
        ->t('Expanded'),
      'collapsed' => $this
        ->t('Collapsed'),
    ],
  ];
}