function paragraphs_features_export in Paragraphs 7
Implements hook_features_export().
File
- ./
paragraphs.features.inc, line 25 - Holds features implementation.
Code
function paragraphs_features_export($data, &$export, $module_name = '') {
$pipe = array();
foreach ($data as $type) {
if (paragraphs_bundle_load($type)) {
$export['features']['paragraphs'][$type] = $type;
$export['dependencies']['paragraphs'] = 'paragraphs';
$export['dependencies']['features'] = 'features';
$fields = field_info_instances('paragraphs_item', $type);
foreach ($fields as $field) {
$pipe['field_instance'][] = "paragraphs_item-{$field['bundle']}-{$field['field_name']}";
}
}
}
return $pipe;
}