You are here

public function ViewsJsonSort::buildOptionsForm in Views Json Source 8

Same name and namespace in other branches
  1. 1.x src/Plugin/views/sort/ViewsJsonSort.php \Drupal\views_json_source\Plugin\views\sort\ViewsJsonSort::buildOptionsForm()

Options form.

Overrides SortPluginBase::buildOptionsForm

File

src/Plugin/views/sort/ViewsJsonSort.php, line 27

Class

ViewsJsonSort
Base sort handler for views_json_source.

Namespace

Drupal\views_json_source\Plugin\views\sort

Code

public function buildOptionsForm(&$form, FormStateInterface $form_state) {
  parent::buildOptionsForm($form, $form_state);
  $form['key'] = [
    '#title' => $this
      ->t('Key Chooser'),
    '#description' => $this
      ->t('choose a key'),
    '#type' => 'textfield',
    '#default_value' => $this->options['key'],
    '#required' => TRUE,
  ];
}