You are here

function defaultconfig_defaultconfig_components in Default config 7

Implements hook_defaultconfig_components().

File

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

Code

function defaultconfig_defaultconfig_components() {
  $components = array(
    'user_default_roles' => array(
      'rebuild callback' => 'defaultconfig_component_rebuild_roles',
      'label' => t('Roles'),
      'features component' => 'user_role',
      'group' => 'features.user_role',
      'weight' => 0,
    ),
    'user_default_permissions' => array(
      'rebuild callback' => 'defaultconfig_component_rebuild_permissions',
      'label' => t('Permissions'),
      'features component' => 'user_permission',
      'group' => 'features.user_permission',
      'weight' => 1,
    ),
    'field_default_fields' => array(
      'rebuild callback' => 'defaultconfig_component_rebuild_fields',
      'disable callback' => 'defaultconfig_disable_fields',
      'label' => t('Fields'),
      'features component' => 'field',
      'group' => 'features.field',
      'weight' => 1,
    ),
    'taxonomy_default_vocabularies' => array(
      'rebuild callback' => 'defaultconfig_component_rebuild_vocabularies',
      'label' => t('Vocabularies'),
      'features component' => 'taxonomy',
      'group' => 'features.taxonomy',
      'weight' => 1,
    ),
    'menu_default_menu_custom' => array(
      'rebuild callback' => 'defaultconfig_component_rebuild_menu_custom',
      'label' => t('Menus'),
      'features component' => 'menu_custom',
      'group' => 'features.menu_custom',
      'weight' => 1,
    ),
  );
  if (module_exists('ctools')) {
    features_include(TRUE);
    $features_info = _ctools_features_get_info(NULL, TRUE);
    foreach ($features_info as $name => $info) {
      $components[$info['default_hook']] = array(
        'rebuild callback' => 'defaultconfig_component_rebuild_ctools',
        'label' => $info['name'],
        'features component' => $name,
        // We can't register CTools files as groups,
        // it causes a lot of things to fail.
        'group' => $info['default_filename'],
      );
    }
  }

  // Override strongarm and use our own version to avoid CTools dependency.
  $components['strongarm'] = array(
    'rebuild callback' => 'defaultconfig_component_rebuild_variables',
    'label' => t('Variables'),
    'features component' => 'variable',
    'group' => 'strongarm',
    'weight' => 1,
  );
  return $components;
}