function ctools_features_export in Features 6
Same name and namespace in other branches
- 7.2 includes/features.ctools.inc \ctools_features_export()
- 7 includes/features.ctools.inc \ctools_features_export()
Implementation of hook_features_export(). Adds references to the ctools mothership hook, ctools_plugin_api().
File
- includes/
features.ctools.inc, line 47
Code
function ctools_features_export($data, &$export, $module_name = '') {
// Add ctools dependency
$export['dependencies']['ctools'] = 'ctools';
// Add the actual ctools components which will need to be accounted for in
// hook_ctools_plugin_api(). The components are actually identified by a
// delimited list of values: `module_name:api:current_version`
foreach ($data as $component) {
if ($info = _ctools_features_get_info($component)) {
$identifier = "{$info['module']}:{$info['api']}:{$info['current_version']}";
$export['features']['ctools'][$identifier] = $identifier;
}
}
return array();
}