You are here

function commerce_price_field_formatter_prepare_view in Commerce Core 7

Implements hook_field_formatter_prepare_view().

File

modules/price/commerce_price.module, line 422
Defines the Price field with widgets and formatters used to add prices with currency codes to various Commerce entities.

Code

function commerce_price_field_formatter_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items, $displays) {

  // TODO: Loop over the instances and pass them to this hook individually so we
  // can enforce prices displaying with components as not being altered.
  // Allow other modules to prepare the item values prior to formatting.
  foreach (module_implements('commerce_price_field_formatter_prepare_view') as $module) {
    $function = $module . '_commerce_price_field_formatter_prepare_view';
    $function($entity_type, $entities, $field, $instances, $langcode, $items, $displays);
  }
}