protected function IngredientFormatter::getUnitDisplayOptions in Recipe 8.2
Returns an array of ingredient quantity unit display options.
Return value
array The array of display options.
2 calls to IngredientFormatter::getUnitDisplayOptions()
- IngredientFormatter::settingsForm in modules/
ingredient/ src/ Plugin/ Field/ FieldFormatter/ IngredientFormatter.php - Returns a form to configure settings for the formatter.
- IngredientFormatter::settingsSummary in modules/
ingredient/ src/ Plugin/ Field/ FieldFormatter/ IngredientFormatter.php - Returns a short summary for the current formatter settings.
File
- modules/
ingredient/ src/ Plugin/ Field/ FieldFormatter/ IngredientFormatter.php, line 132
Class
- IngredientFormatter
- Plugin implementation of the 'ingredient_default' formatter.
Namespace
Drupal\ingredient\Plugin\Field\FieldFormatterCode
protected function getUnitDisplayOptions() {
return [
0 => $this
->t('Abbreviation'),
1 => $this
->t('Full name'),
];
}