You are here

function commerce_line_item_type_load in Commerce Core 7

Returns a single line item type array.

Parameters

$type: The machine-readable name of the line item type.

Return value

The specified line item type array or FALSE if it does not exist.

4 calls to commerce_line_item_type_load()
commerce_line_item_configure_line_item_fields in modules/line_item/commerce_line_item.module
Configures line item types defined by other modules that are enabled after the Line Item module.
commerce_line_item_field_widget_form in modules/line_item/commerce_line_item.module
Implements hook_field_widget_form().
commerce_line_item_title in modules/line_item/commerce_line_item.module
Returns the title of a line item based on its type.
commerce_line_item_ui_form_alter in modules/line_item/commerce_line_item_ui.module
Implements hook_form_alter().

File

modules/line_item/commerce_line_item.module, line 474
Defines the core Commerce line item entity and API functions interact with line items on orders.

Code

function commerce_line_item_type_load($type) {
  $line_item_types = commerce_line_item_types();
  return isset($line_item_types[$type]) ? $line_item_types[$type] : FALSE;
}