You are here

function multifield_field_default_field_bases_alter in Multifield 7.2

Same name and namespace in other branches
  1. 7 multifield.features.inc \multifield_field_default_field_bases_alter()

Implements hook_field_default_field_bases_alter().

File

./multifield.features.inc, line 6

Code

function multifield_field_default_field_bases_alter(&$fields) {
  foreach ($fields as $field_name => $field) {
    if ($field['module'] == 'multifield') {

      // Prevent errors if a multifield is exported via features but its
      // subfields have not yet been created. Ideally core should not be
      // storing the schema indexes and foreign keys in the field definition
      // since these are both fetched from hook_field_schema().
      $fields[$field_name]['indexes'] = array();
      $fields[$field_name]['foreign keys'] = array();
    }
  }
}