I'm not sure if this is a Features module question or simply a module construction question.

I have a module which was constructed with Features, which I have never used before. In the .info file of the module there are a lot of lines that read similar to features[something][] = something.

What is this and where is it used in the module?

  • Hi :) Please try to keep to one question per question. The second part of this was actually quite a good question - I'd suggest posting it as a standalone question.
    – Chapabu
    Commented Aug 20, 2013 at 15:40
  • 1
    Thanks, I did here drupal.stackexchange.com/questions/83104/… Commented Aug 20, 2013 at 15:49

1 Answer 1


Some of the documentation is sparse (still!?) https://drupal.org/node/1720098

The entries in your .info file tell Features that that item of your configuration is controlled by Features and not say Drupal core. You'll see stuff like ctools or views in there. In the main features.inc file the features info hook will require those API dependancies.

Based upon other lines in the info file such as:

features[ctools][] = strongarm:strongarm:1
features[ctools][] = views:views_default:3.0
features[user_permission][] = create features_test content
features[views_view][] = features_test

These lines would say, features uses Strongarm to read/write configuration of variables, and Ctools integration. Then there is some view features_test and some user permission exported create features_test content.

From the documentation page i linked these .info configuration values then:

They are called during hook_module_enable/disable to fire the right stuff in the right places.

By Features itself. The info file contents tells Features what its managing. The .inc files include the dynamic configuration values needed per .info item entry (usually in terms of plain Drupal hook_info configuration definitions that'd you basically be making in code anyways).

I recommend reading the Features API and Readme:



  • Thank for the answer and the links! I will read through them and hopfully that will answer all of my questions. Commented Aug 20, 2013 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.