You are here

function defaultconfig_component_rebuild in Default config 7

Rebuild a particular component.

5 calls to defaultconfig_component_rebuild()
defaultconfig_component_rebuild_form_submit in ./defaultconfig.admin.inc
defaultconfig_modules_enabled in ./defaultconfig.module
Implements hook_modules_enabled().
defaultconfig_optional_save in ./defaultconfig.module
Save an optional setting..
defaultconfig_rebuild_all in ./defaultconfig.module
Rebuild all default components.
_defaultconfig_batch_operation in ./defaultconfig.module
Rebuild default configuration in a batch.

File

./defaultconfig.module, line 354
main module file.

Code

function defaultconfig_component_rebuild($component, $module = FALSE) {
  defaultconfig_include();
  defaultconfig_component_include($component, $module);

  // Fetch all components from defaultconfig-specific hooks.
  if ($module) {
    $defaults = module_invoke($module, $component['hook']);
  }
  else {
    $defaults = module_invoke_all($component['hook']);
  }

  // Allow the possibility of altering the default components.
  drupal_alter($component['hook'], $defaults, $module);

  // Have a generic alter for all components.
  drupal_alter('defaultconfig_component', $defaults, $component);
  watchdog('defaultconfig', 'Rebuilding @component for @module.', array(
    '@component' => $component['name'],
    '@module' => $module ? $module : 'all modules',
  ));
  $component['rebuild callback']($component, $defaults, $module);
}