You are here

function physical_volume_units in Physical Fields 7

Returns an associative array of volume units of measurement.

3 calls to physical_volume_units()
physical_volume_unit_abbreviation in ./physical.module
Returns the translated abbreviation of a volume unit of measurement.
physical_volume_unit_name in ./physical.module
Returns the name of a volume unit of measurement.
physical_volume_unit_options in ./physical.module
Returns an options array of volume units of measurement.

File

./physical.module, line 550
Defines fields (e.g. weight and dimensions) to support describing the physical attributes of entities.

Code

function physical_volume_units() {
  $units = array(
    'l' => array(
      'name' => t('Liter'),
      'abbreviation' => t('l'),
    ),
    'm3' => array(
      'name' => t('Cubic Meter'),
      'abbreviation' => t('m3'),
    ),
    'ml' => array(
      'name' => t('Milliliter'),
      'abbreviation' => t('ml'),
    ),
    'fl oz' => array(
      'name' => t('Ounce'),
      'abbreviation' => t('fl oz'),
    ),
    'pt' => array(
      'name' => t('Pint'),
      'abbreviation' => t('pint'),
    ),
    'gal' => array(
      'name' => t('Gallon'),
      'abbreviation' => t('gal'),
    ),
  );
  drupal_alter('physical_volume_unit_info', $units);
  return $units;
}