You are here

function physical_dimension_units in Physical Fields 7

Returns an associative array of dimensions units of measurement.

3 calls to physical_dimension_units()
physical_dimension_unit_abbreviation in ./physical.module
Returns the translated abbreviation of a dimension unit of measurement.
physical_dimension_unit_name in ./physical.module
Returns the name of a dimension unit of measurement.
physical_dimension_unit_options in ./physical.module
Returns an options array of dimension units of measurement.

File

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

Code

function physical_dimension_units() {
  $units = array(
    'in' => array(
      'name' => t('Inches'),
      'abbreviation' => t('in'),
    ),
    'ft' => array(
      'name' => t('Feet'),
      'abbreviation' => t('ft'),
    ),
    'mm' => array(
      'name' => t('Millimeters'),
      'abbreviation' => t('mm'),
    ),
    'cm' => array(
      'name' => t('Centimeters'),
      'abbreviation' => t('cm'),
    ),
    'm' => array(
      'name' => t('Meters'),
      'abbreviation' => t('m'),
    ),
  );
  drupal_alter('physical_dimension_unit_info', $units);
  return $units;
}