You are here

function commerce_line_item_manager_refresh in Commerce Core 7

Returns the line item manager element for display via AJAX.

1 string reference to 'commerce_line_item_manager_refresh'
commerce_line_item_field_widget_form in modules/line_item/commerce_line_item.module
Implements hook_field_widget_form().

File

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

Code

function commerce_line_item_manager_refresh($form, $form_state) {

  // Reverse the array parents of the triggering element, because we know the
  // part of the form to return will be 3 elements up from the triggering element.
  $parents = array_reverse($form_state['triggering_element']['#array_parents']);
  return $form[$parents[3]][$form[$parents[3]]['#language']];
}