You are here

public function TreeTable::buildOptionsForm in Views tree 8.2

Render the given style.

Overrides Table::buildOptionsForm

File

src/Plugin/views/style/TreeTable.php, line 39

Class

TreeTable
Defines a tree-based table display.

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);

  // This is the column the hierarchy will actually be displayed in.
  $form['display_hierarchy_column'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Hierarchy display column'),
    '#description' => $this
      ->t('The table column in which to represent the hierarchy. This is typically a title/label field.'),
    '#required' => TRUE,
    '#options' => $this->displayHandler
      ->getFieldLabels(),
    '#default_value' => $this->options['display_hierarchy_column'],
  ];
}