function hierarchical_select_features_export in Hierarchical Select 6.3
Same name and namespace in other branches
- 7.3 hierarchical_select.features.inc \hierarchical_select_features_export()
Implementation of hook_features_export().
File
- ./
hierarchical_select.features.inc, line 11 - Integration with the features module.
Code
function hierarchical_select_features_export($data, &$export, $module_name) {
// Add hierarchical_select dependency.
$export['dependencies']['hierarchical_select'] = 'hierarchical_select';
// Retrieve dependencies from all information items.
$dependencies = array();
foreach (module_implements('hierarchical_select_config_info') as $module) {
$configs = module_invoke($module, 'hierarchical_select_config_info');
foreach ($configs as $config_id => $config) {
$dependencies[$config_id] = $module;
}
}
// Add features and dependencies.
foreach ($data as $config_id) {
$export['features']['hierarchical_select'][$config_id] = $config_id;
if (isset($dependencies[$config_id])) {
$module = $dependencies[$config_id];
$export['dependencies'][$module] = $module;
}
}
return array();
}