You are here

function physical_volume_format in Physical Fields 7

Returns the formatted volume string for the given volume value array.

Parameters

array $value: A volume field value array containing volume and unit keys.

Return value

string Formatted value.

1 call to physical_volume_format()
physical_field_formatter_view in ./physical.module
Implements hook_field_formatter_view().

File

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

Code

function physical_volume_format(array $value) {
  return t('@volume @unit', array(
    '@volume' => round($value['volume'], 5),
    '@unit' => physical_volume_unit_abbreviation($value['unit']),
  ));
}