You are here

function commerce_invoice_required_field_bases in Commerce Invoice 7.2

Required field bases for Commerce Invoice.

Return value

array An array of field definitions, keyed by the field name.

1 call to commerce_invoice_required_field_bases()
commerce_invoice_ensure_fields in ./commerce_invoice.module
Ensure required fields are present on invoices.

File

./commerce_invoice.fields.inc, line 13
Fields and instances for the Commerce Invoice module.

Code

function commerce_invoice_required_field_bases() {
  $field_bases = array();
  $field_bases['commerce_invoice_items'] = array(
    'active' => 1,
    'cardinality' => -1,
    'deleted' => 0,
    'entity_types' => array(
      'commerce_invoice',
    ),
    'field_name' => 'commerce_invoice_items',
    'indexes' => array(
      'line_item_id' => array(
        0 => 'line_item_id',
      ),
    ),
    'locked' => 1,
    'module' => 'commerce_line_item',
    'settings' => array(),
    'translatable' => 0,
    'type' => 'commerce_line_item_reference',
  );
  $field_bases['commerce_invoice_total'] = array(
    'active' => 1,
    'cardinality' => 1,
    'deleted' => 0,
    'entity_types' => array(
      'commerce_invoice',
    ),
    'field_name' => 'commerce_invoice_total',
    'indexes' => array(
      'currency_price' => array(
        0 => 'amount',
        1 => 'currency_code',
      ),
    ),
    'locked' => 1,
    'module' => 'commerce_price',
    'settings' => array(),
    'translatable' => 0,
    'type' => 'commerce_price',
  );
  $field_bases['commerce_invoice_address'] = array(
    'active' => 1,
    'cardinality' => 1,
    'deleted' => 0,
    'entity_types' => array(
      'commerce_invoice',
    ),
    'field_name' => 'commerce_invoice_address',
    'locked' => 0,
    'module' => 'addressfield',
    'translatable' => 0,
    'type' => 'addressfield',
  );
  return $field_bases;
}