You are here

function features_modules_enabled in Features 7

Same name and namespace in other branches
  1. 7.2 features.module \features_modules_enabled()

Implements hook_modules_enabled().

File

./features.module, line 302
Module file for the features module, which enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together statisfy a certain use-case.

Code

function features_modules_enabled($modules) {

  // Go through all modules and gather features that can be enabled.
  $items = array();
  foreach ($modules as $module) {
    if ($feature = features_load_feature($module)) {
      $items[$module] = array_keys($feature->info['features']);
    }
  }
  if (!empty($items)) {
    _features_restore('enable', $items);

    // Rebuild the list of features includes.
    features_include(TRUE);
  }
}