You are here

protected function SortPluginBase::showSortForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::showSortForm()
  2. 10 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::showSortForm()

Shortcut to display the value form.

1 call to SortPluginBase::showSortForm()
SortPluginBase::buildOptionsForm in core/modules/views/src/Plugin/views/sort/SortPluginBase.php
Basic options for all sort criteria

File

core/modules/views/src/Plugin/views/sort/SortPluginBase.php, line 168

Class

SortPluginBase
Base sort handler that has no options and performs a simple sort.

Namespace

Drupal\views\Plugin\views\sort

Code

protected function showSortForm(&$form, FormStateInterface $form_state) {
  $options = $this
    ->sortOptions();
  if (!empty($options)) {
    $form['order'] = [
      '#title' => $this
        ->t('Order', [], [
        'context' => 'Sort order',
      ]),
      '#type' => 'radios',
      '#options' => $options,
      '#default_value' => $this->options['order'],
    ];
  }
}