function eck_bundle_features_export in Entity Construction Kit (ECK) 7.3
Same name and namespace in other branches
- 7.2 eck.features.inc \eck_bundle_features_export()
Implements hook_features_export().
File
- ./
eck.features.inc, line 156 - Integration with the Features module.
Code
function eck_bundle_features_export($data, &$export, $module_name = '') {
$pipe = array();
// What is this for?
$map = features_get_default_map('eck');
foreach ($data as $type) {
// Export the entity type.
$export['features']['eck_bundle'][$type] = $type;
$export['dependencies']['eck'] = 'eck';
$export['dependencies']['features'] = 'features';
// Export fields.
// @TODO: Features already supports this, just gotta find the right calls.
$bundle = Bundle::loadByMachineName($type);
$fields = field_info_instances($bundle->entity_type, $bundle->name);
foreach ($fields as $field) {
$pipe['field'][] = "{$bundle->entity_type}-{$field['bundle']}-{$field['field_name']}";
}
}
return $pipe;
}