You are here

function commerce_price_table_get_field_instance_settings in Commerce Price Table 7

Return the settings of all the price table field of a bundle.

3 calls to commerce_price_table_get_field_instance_settings()
commerce_price_table_entity_view_alter in ./commerce_price_table.module
Implements hook_entity_view_alter().
commerce_price_table_form_commerce_product_ui_product_form_alter in ./commerce_price_table.module
Implements hook_form_FORM_ID_alter().
PriceTableCommerceProductInlineEntityFormController::defaultFields in commerce_price_table_ief/includes/commerce_price_table_ief_commerce_product.inline_entity_form.inc

File

./commerce_price_table.module, line 530

Code

function commerce_price_table_get_field_instance_settings($entity_type = 'commerce_product', $bundle = 'product') {
  $settings = array();
  $fields = commerce_info_fields('commerce_price_table', $entity_type);
  if (isset($fields) && is_array($fields)) {
    foreach ($fields as $field) {
      $settings[] = field_info_instance($entity_type, $field['field_name'], $bundle);
    }
  }
  return $settings;
}