Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
hefox CreditAttribution: hefox commentedThere'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
Comment #2
joachim CreditAttribution: joachim commentedNot terribly clear ones, and the parameters aren't very clear, eg:
What does it mean to pass that in, or not?