You are here

public static function VolumeUnit::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/VolumeUnit.php, line 25

Class

VolumeUnit
Provides volume units.

Namespace

Drupal\physical

Code

public static function getLabels() {
  return [
    self::MILLILITER => t('ml'),
    self::CENTILITER => t('cl'),
    self::DECILITER => t('dl'),
    self::LITER => t('l'),
    self::CUBIC_MILLIMETER => t('mm³'),
    self::CUBIC_CENTIMETER => t('cm³'),
    self::CUBIC_METER => t('m³'),
    self::CUBIC_INCH => t('in³'),
    self::CUBIC_FOOT => t('ft³'),
    self::FLUID_OUNCE => t('fl oz'),
    self::US_GALLON => t('gal'),
  ];
}