private function WidgetBase::getAvailableSortOptions in Select (or other) 4.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldWidget/WidgetBase.php \Drupal\select_or_other\Plugin\Field\FieldWidget\WidgetBase::getAvailableSortOptions()
Returns the available sorting options.
@codeCoverageIgnore Testing this method would only test if this hard-coded array equals the one in the test case.
Return value
array The available sorting options.
2 calls to WidgetBase::getAvailableSortOptions()
- WidgetBase::settingsForm in src/
Plugin/ Field/ FieldWidget/ WidgetBase.php - Returns a form to configure settings for the widget.
- WidgetBase::settingsSummary in src/
Plugin/ Field/ FieldWidget/ WidgetBase.php - Returns a short summary for the current widget settings.
File
- src/
Plugin/ Field/ FieldWidget/ WidgetBase.php, line 272
Class
- WidgetBase
- Base class for the 'select_or_other_*' widgets.
Namespace
Drupal\select_or_other\Plugin\Field\FieldWidgetCode
private function getAvailableSortOptions() {
return [
'' => $this
->t('No sorting'),
'ASC' => $this
->t('Sorted ascending'),
'DESC' => $this
->t('Sorted descending'),
];
}