You are here

function multifield_features_pipe_field_base_alter in Multifield 7.2

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

Implements hook_features_pipe_COMPONENT_alter().

File

./multifield.features.inc, line 22

Code

function multifield_features_pipe_field_base_alter(&$pipe, $data, $export) {
  foreach ($data as $field_name) {

    // Export a multifield's subfields along with the field base.
    if ($field = field_info_field($field_name)) {
      if ($machine_name = multifield_extract_multifield_machine_name($field)) {
        foreach (multifield_type_get_subfields($machine_name) as $subfield_name) {
          $pipe['field_instance'][] = "multifield-{$machine_name}-{$subfield_name}";
        }
      }
    }
  }
}