You are here

function commerce_price_component_titles in Commerce Core 7

Returns an array of price component type titles keyed by name.

1 call to commerce_price_component_titles()
commerce_line_item_price_component_options_list in modules/line_item/commerce_line_item.rules.inc
Options list callback: price component selection list.

File

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

Code

function commerce_price_component_titles() {
  static $titles = array();
  if (empty($titles)) {
    foreach (commerce_price_component_types() as $name => $component_type) {
      $titles[$name] = $component_type['title'];
    }
  }
  return $titles;
}