Integrating Some Other Feature with Spaces
I have found more than once a situation in which I had a basic feature that could be used on any site which I would like to see integrated with Spaces (for OpenAtrium magic). It usually runs like this:
- I have the FeatureServer feature.
- I want it in OpenAtrium.
- Here’s a new Feature that provides some Contexts and some Groups variables.
- Here’s a patch that you must apply to FeatureServer to make Spaces aware of it. (And other stuff).
#4 is a pain, but I’ve recently discovered how to shrink it down a little more: hook_system_info_alter().
/** * Implementation of hook_system_info_alter(). */ function my_atrium_savvy_feature_system_info_alter(&$info, $row) { if ($row->name == 'some_other_feature') { $info['spaces']['types'][] = 'og'; } }
This hook is called from features_get_info() in features.module. The hook allows you to changes all the info files settings of a feature. Note: Row is apparently a huge variable to dump to the screen.