You are here

function physical_weight_units in Physical Fields 7

Returns an associative array of weight units of measurement.

Return value

array Array of units for measuring volume.

3 calls to physical_weight_units()
physical_weight_unit_abbreviation in ./physical.module
Returns the translated abbreviation of a weight unit of measurement.
physical_weight_unit_name in ./physical.module
Returns the name of a weight unit of measurement.
physical_weight_unit_options in ./physical.module
Returns an options array of weight units of measurement.

File

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

Code

function physical_weight_units() {
  $units = array(
    'lb' => array(
      'name' => t('Pounds'),
      'abbreviation' => t('lb'),
    ),
    'oz' => array(
      'name' => t('Ounces'),
      'abbreviation' => t('oz'),
    ),
    'kg' => array(
      'name' => t('Kilograms'),
      'abbreviation' => t('kg'),
    ),
    'g' => array(
      'name' => t('Grams'),
      'abbreviation' => t('g'),
    ),
  );
  drupal_alter('physical_weight_unit_info', $units);
  return $units;
}