You are here

function quantity_measures in farmOS 2.x

Define information about available quantity measures.

Return value

array Returns an array of measure information.

2 calls to quantity_measures()
InventoryFormatter::viewElements in modules/core/inventory/src/Plugin/Field/FieldFormatter/InventoryFormatter.php
Builds a renderable array for a field value.
quantity_measure_options in modules/core/quantity/quantity.module
Define available options for the Measure field.

File

modules/core/quantity/quantity.module, line 20
Quantity module.

Code

function quantity_measures() {
  return [
    'count' => [
      'label' => t('Count'),
    ],
    'length' => [
      'label' => t('Length/depth'),
    ],
    'weight' => [
      'label' => t('Weight'),
    ],
    'area' => [
      'label' => t('Area'),
    ],
    'volume' => [
      'label' => t('Volume'),
    ],
    'time' => [
      'label' => t('Time'),
    ],
    'temperature' => [
      'label' => t('Temperature'),
    ],
    'pressure' => [
      'label' => t('Pressure'),
    ],
    'water_content' => [
      'label' => t('Water content'),
    ],
    'value' => [
      'label' => t('Value'),
    ],
    'rate' => [
      'label' => t('Rate'),
    ],
    'rating' => [
      'label' => t('Rating'),
    ],
    'ratio' => [
      'label' => t('Ratio'),
    ],
    'probability' => [
      'label' => t('Probability'),
    ],
  ];
}