You are here

public function Menu::buildOptionsForm in Menu Entity Index 8

Provide the default form for setting options.

Overrides ArgumentDefaultPluginBase::buildOptionsForm

File

src/Plugin/views/argument_default/Menu.php, line 75

Class

Menu
The menu argument default handler.

Namespace

Drupal\menu_entity_index\Plugin\views\argument_default

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['argument'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Menu'),
    '#options' => $this->tracker
      ->getAvailableMenus(),
    '#default_value' => $this->options['argument'],
  ];
}