Presenter Output

This section will show you how to use the decorated value provided by the \Anomaly\SliderFieldType\SliderFieldTypePresenter class.

SliderFieldTypePresenter::top()

The top method returns the top end value for range enabled sliders.

Returns: integer
Example
$decorated->example->top(); // 20
Twig
{{ decorated.example.top() }} // 20

SliderFieldTypePresenter::bottom()

The bottom method returns the bottom end value for range enabled sliders.

Returns: integer
Example
$decorated->example->bottom(); // 10
Twig
{{ decorated.example.bottom() }} // 10

SliderFieldTypePresenter::values()

The values method returns the bottom and top end values in an array for range enabled sliders.

Returns: array
Example
$decorated->example->values()[0];
Twig
{{ decorated.example.values()|first }}