function commerce_line_item_get_properties in Commerce Core 7
Callback for getting line item properties.
See also
commerce_line_item_entity_property_info()
1 string reference to 'commerce_line_item_get_properties'
- commerce_line_item_entity_property_info in modules/
line_item/ commerce_line_item.info.inc - Implements hook_entity_property_info().
File
- modules/
line_item/ commerce_line_item.module, line 1411 - Defines the core Commerce line item entity and API functions interact with line items on orders.
Code
function commerce_line_item_get_properties($line_item, array $options, $name) {
switch ($name) {
case 'order':
return !empty($line_item->order_id) ? $line_item->order_id : commerce_order_new();
}
}