function commerce_invoice_required_field_instances in Commerce Invoice 7.2
Required field instances for Commerce Invoice.
Return value
array An array of field instance definitions.
1 call to commerce_invoice_required_field_instances()
- commerce_invoice_ensure_fields in ./
commerce_invoice.module - Ensure required fields are present on invoices.
File
- ./
commerce_invoice.fields.inc, line 74 - Fields and instances for the Commerce Invoice module.
Code
function commerce_invoice_required_field_instances() {
$field_instances = array();
$field_instances['commerce_invoice-commerce_invoice-commerce_invoice_items'] = array(
'bundle' => 'commerce_invoice',
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'commerce_line_item',
'settings' => array(
// @todo: Create a new view as commerce_line_item_table displays only
// line items of product type.
'view' => 'commerce_line_item_table|default',
),
'type' => 'commerce_line_item_reference_view',
'weight' => 0,
),
),
'entity_type' => 'commerce_invoice',
'field_name' => 'commerce_invoice_items',
'label' => 'Line items',
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'inline_entity_form',
'settings' => array(
'fields' => array(),
'type_settings' => array(
'allow_clone' => 0,
'allow_existing' => FALSE,
'allow_new' => 1,
'delete_references' => 1,
'label_plural' => 'line items',
'label_singular' => 'line item',
'match_operator' => 'CONTAINS',
'override_labels' => 0,
),
),
'type' => 'inline_entity_form',
'weight' => 40,
),
);
$field_instances['commerce_invoice-commerce_invoice-commerce_invoice_address'] = array(
'bundle' => 'commerce_invoice',
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'type' => 'addressfield_default',
'weight' => -10,
),
),
'entity_type' => 'commerce_invoice',
'field_name' => 'commerce_invoice_address',
'label' => t('Address'),
'required' => 0,
'widget' => array(
'active' => 1,
'type' => 'addressfield_standard',
'weight' => 50,
'settings' => array(
'format_handlers' => array(
'address',
'name-oneline',
),
),
),
);
$field_instances['commerce_invoice-commerce_invoice-commerce_invoice_total'] = array(
'bundle' => 'commerce_invoice',
'default_value' => NULL,
'deleted' => 0,
'description' => '',
'display' => array(
'default' => array(
'label' => 'hidden',
'module' => 'commerce_price',
'settings' => array(
'calculation' => FALSE,
),
'type' => 'commerce_price_formatted_components',
'weight' => 20,
),
),
'entity_type' => 'commerce_invoice',
'field_name' => 'commerce_invoice_total',
'label' => t('Total'),
'required' => 0,
'settings' => array(
'user_register_form' => FALSE,
),
'widget' => array(
'active' => 1,
'module' => 'commerce_price',
'settings' => array(
'currency_code' => 'default',
),
'type' => 'commerce_price_full',
'weight' => 60,
),
);
return $field_instances;
}