function profile_module_manager_modules_enabled in Profile Module Manager 7
Same name and namespace in other branches
- 7.2 profile_module_manager.module \profile_module_manager_modules_enabled()
Implements hook_modules_installed(). Run functions after bundles are enabled.
File
- ./
profile_module_manager.module, line 282 - Alters grouping in admin/modules using hook_system_info_alter
Code
function profile_module_manager_modules_enabled($modules) {
foreach ($modules as $module) {
// Only run these functions if module name includes _bundle
if (strpos($module, '_bundle') !== false) {
// Get the info file.
$path = drupal_get_path('module', $module) . '/' . $module . '.info';
$info = drupal_parse_info_file($path);
// Rebuild node types.
node_types_rebuild();
// Clear caches.
if (isset($info['bundle_cache_clear']) && $info['bundle_cache_clear']) {
drupal_flush_all_caches();
}
if (isset($info['bundle_context_clear']) && $info['bundle_context_clear']) {
drupal_flush_all_caches();
}
}
}
}