You are here

function commerce_price_component_type_load in Commerce Core 7

Returns a component type array.

Parameters

$name: The machine-name of the component type to return.

Return value

A component type array or FALSE if not found.

3 calls to commerce_price_component_type_load()
commerce_line_item_rebase_unit_price in modules/line_item/commerce_line_item.module
Recalculates the price components of the given line item's unit price based on its current amount and currency code.
commerce_price_field_formatter_view in modules/price/commerce_price.module
Implements hook_field_formatter_view().
commerce_tax_commerce_line_item_rebase_unit_price in modules/tax/commerce_tax.module
Implements hook_commerce_line_item_rebase_unit_price().

File

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

Code

function commerce_price_component_type_load($name) {
  $component_types = commerce_price_component_types();
  return !empty($component_types[$name]) ? $component_types[$name] : FALSE;
}