function features_include in Features 7
Same name and namespace in other branches
- 6 features.module \features_include()
- 7.2 features.module \features_include()
Load includes for any modules that implement the features API and load includes for those provided by features.
20 calls to features_include()
- drush_features_revert in ./
features.drush.inc - Revert a feature to it's code definition. Optionally accept a list of components to revert.
- FeaturesCtoolsIntegrationTest::testModuleEnable in tests/
features.test - Run test.
- FeaturesUserTestCase::_test_filter in tests/
features.test - features_access_override_actions in ./
features.module - Menu access callback for whether a user should be able to access override actions for a given feature.
- features_admin_components_revert in ./
features.admin.inc - Submit handler for revert form.
1 string reference to 'features_include'
- features_update_6101 in ./
features.install - Update 6101: Set codestate signature for all features.
File
- ./
features.module, line 322 - 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_include($reset = FALSE) {
static $once;
if (!isset($once) || $reset) {
$once = TRUE;
// Features provides integration on behalf of these modules.
// The features include provides handling for the feature dependencies.
// Note that ctools is placed last because it implements hooks "dynamically" for other modules.
$modules = array(
'features',
'block',
'context',
'field',
'filter',
'image',
'locale',
'menu',
'node',
'taxonomy',
'user',
'views',
'ctools',
);
foreach (array_filter($modules, 'module_exists') as $module) {
module_load_include('inc', 'features', "includes/features.{$module}");
}
if (module_exists('ctools')) {
// Finally, add ctools eval'd implementations.
ctools_features_declare_functions($reset);
}
// Clear static cache, since we've now included new implementers.
foreach (features_get_components(NULL, 'file', $reset) as $file) {
if (is_file(DRUPAL_ROOT . '/' . $file)) {
require_once DRUPAL_ROOT . '/' . $file;
}
}
}
}