Presenter Output
This section will show you how to use the decorated value provided by the \Anomaly\SelectFieldType\SelectFieldTypePresenter class.
SelectFieldTypePresenter::key()
The key method returns the selected value's key.
Returns: string
Example
$decorated->example->key();
Twig
{{ decorated.example.key() }}
SelectFieldTypePresenter::value()
The value method returns the selected value.
Returns: string
Example
$decorated->example->value();
Twig
{{ decorated.example.value() }}
SelectFieldTypePresenter::currency()
The currency method returns the currency definition for the selected value when using the currency handler.
Returns: array or null
Example
$decorated->example->currency()['symbol'];
Twig
{{ decorated.example.currency().symbol }}