trait RangeSliderTrait in Range Slider 8
Class RangeSliderTrait.
Hierarchy
- trait \Drupal\range_slider\RangeSliderTrait uses StringTranslationTrait
1 file declares its use of RangeSliderTrait
- RangeSliderWidget.php in src/
Plugin/ Field/ FieldWidget/ RangeSliderWidget.php
File
- src/
RangeSliderTrait.php, line 10
Namespace
Drupal\range_sliderView source
trait RangeSliderTrait {
use StringTranslationTrait;
/**
* Get orientation options.
*/
public function getOrientationOptions() {
return [
'horizontal' => $this
->t('Horizontal'),
'vertical' => $this
->t('Vertical'),
];
}
/**
* Get output options.
*/
public function getOutputOptions() {
return [
'below' => $this
->t('Below'),
'above' => $this
->t('Above'),
'left' => $this
->t('Left'),
'right' => $this
->t('Right'),
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RangeSliderTrait:: |
public | function | Get orientation options. | |
RangeSliderTrait:: |
public | function | Get output options. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |