function filefield_paths_features_pipe_field_instance_alter in File (Field) Paths 7
Implements hook_features_pipe_field_instance_alter().
This determines whether exported fields contain File (Field) Paths settings and if so adds File (Field) Paths as a dependency.
Parameters
$pipe:
$data:
$export:
1 call to filefield_paths_features_pipe_field_instance_alter()
- filefield_paths_features_pipe_field_alter in modules/
features.inc - Implements hook_features_pipe_field_alter().
File
- modules/
features.inc, line 18 - Features module integration.
Code
function filefield_paths_features_pipe_field_instance_alter(&$pipe, $data, &$export) {
foreach ($data as $field_identifier) {
list($entity_type, $bundle_name, $field_name) = explode('-', $field_identifier);
$instance = field_info_instance($entity_type, $field_name, $bundle_name);
if (isset($instance['settings']['filefield_paths'])) {
$export['dependencies']['filefield_paths'] = 'filefield_paths';
}
}
}