I'm trying to track down a bug with Media's file display exportables, but finding the code in Features hard to understand.

features_get_components() and features_get_feature_components() have similar names, but ones returns a subset of the other. What's the difference?

The code for the latter being calls to the same thing with different parameters doesn't help with my confusion:

function features_get_feature_components() {
  return array_intersect_key(features_get_components(), array_filter(features_get_components(NULL, 'feature_source')));
}

Any chance these could have their documentation improved?

Comments

hefox’s picture

There's no function comments? o.o

it looks like features_get_feature_component returns components listed as features_source, e.g. can decide to include them via ui, unlike ctools api/views api components

joachim’s picture

Not terribly clear ones, and the parameters aren't very clear, eg:

 * @param $key
 *   A key that hook_features_api supports.

What does it mean to pass that in, or not?