You are here

public function CommerceLineItemInlineEntityFormController::tableFields in Inline Entity Form 7

Overrides EntityInlineEntityFormController::tableFields().

Overrides EntityInlineEntityFormController::tableFields

File

includes/commerce_line_item.inline_entity_form.inc, line 13
Defines the inline entity form controller for Commerce Line Items.

Class

CommerceLineItemInlineEntityFormController
@file Defines the inline entity form controller for Commerce Line Items.

Code

public function tableFields($bundles) {
  $fields = array();
  $fields['line_item_label'] = array(
    'type' => 'property',
    'label' => t('Label'),
    'weight' => 1,
  );
  $fields['commerce_unit_price'] = array(
    'type' => 'field',
    'label' => t('Unit price'),
    'formatter' => 'commerce_price_formatted_amount',
    'weight' => 2,
  );
  $fields['quantity'] = array(
    'type' => 'property',
    'label' => t('Quantity'),
    'weight' => 3,
  );
  $fields['commerce_total'] = array(
    'type' => 'field',
    'label' => t('Total'),
    'formatter' => 'commerce_price_formatted_amount',
    'weight' => 4,
  );
  return $fields;
}