You are here

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

Class

AreaUnit
Provides area units.

Namespace

Drupal\physical

Code

public static function getLabels() {
  return [
    self::SQUARE_MILLIMETER => t('mm²'),
    self::SQUARE_CENTIMETER => t('cm²'),
    self::SQUARE_METER => t('m²'),
    self::SQUARE_INCH => t('in²'),
    self::SQUARE_FOOT => t('ft²'),
    self::HECTARE => t('ha'),
  ];
}