public static function MeasurementType::getLabels in Physical Fields 8
Gets the labels for the defined measurement types.
Return value
array An array of labels keyed by measurement type.
2 calls to MeasurementType::getLabels()
- MeasurementItem::getPreconfiguredOptions in src/
Plugin/ Field/ FieldType/ MeasurementItem.php - Returns preconfigured field options for a field type.
- MeasurementItem::storageSettingsForm in src/
Plugin/ Field/ FieldType/ MeasurementItem.php - Returns a form for the storage-level settings.
File
- src/
MeasurementType.php, line 22
Class
- MeasurementType
- Provides measurement types.
Namespace
Drupal\physicalCode
public static function getLabels() {
return [
self::AREA => t('Area'),
self::LENGTH => t('Length'),
self::TEMPERATURE => t('Temperature'),
self::VOLUME => t('Volume'),
self::WEIGHT => t('Weight'),
];
}