function SortPluginBase::showSortForm
Same name in other branches
- 9 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::showSortForm()
- 10 core/modules/views/src/Plugin/views/sort/SortPluginBase.php \Drupal\views\Plugin\views\sort\SortPluginBase::showSortForm()
- 11.x 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\sortCode
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'],
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.