public static function WeightUnit::getLabels in Physical Fields 8
Gets the labels for the defined units.
Return value
array An array of labels keyed by unit.
Overrides UnitInterface::getLabels
File
- src/
WeightUnit.php, line 19
Class
- WeightUnit
- Provides weight units.
Namespace
Drupal\physicalCode
public static function getLabels() {
return [
self::MILLIGRAM => t('mg'),
self::GRAM => t('g'),
self::KILOGRAM => t('kg'),
self::OUNCE => t('oz'),
self::POUND => t('lb'),
];
}