function configuration_get_default_map in Configuration Management 7
Get a map of components to their providing modules.
8 calls to configuration_get_default_map()
- configuration_migrate_form in ./
configuration.admin.inc - Menu Callback Form.
- field_configuration_export in includes/
configuration.field.inc - Implements hook_configuration_export().
- image_configuration_export in includes/
configuration.image.inc - Implements hook_configuration_export().
- menu_custom_configuration_export in includes/
configuration.menu.inc - Implements hook_configuration_export().
- menu_links_configuration_export in includes/
configuration.menu.inc - Implements hook_configuration_export().
File
- ./
configuration.export.inc, line 595
Code
function configuration_get_default_map($component, $attribute = NULL, $callback = NULL, $reset = FALSE) {
static $map = array();
configuration_include();
configuration_include_defaults($component);
if ((!isset($map[$component]) || $reset) && ($default_hook = configuration_get_default_hooks($component))) {
$map[$component] = array();
foreach (module_implements($default_hook) as $module) {
if ($defaults = configuration_get_default($component, $module)) {
foreach ($defaults as $key => $object) {
if (isset($callback)) {
if ($object_key = $callback($object)) {
$map[$component][$object_key] = $module;
}
}
elseif (isset($attribute)) {
if (is_object($object) && isset($object->{$attribute})) {
$map[$component][$object->{$attribute}] = $module;
}
elseif (is_array($object) && isset($object[$attribute])) {
$map[$component][$object[$attribute]] = $module;
}
}
elseif (!isset($attribute) && !isset($callback)) {
if (!is_numeric($key)) {
$map[$component][$key] = $module;
}
}
else {
return FALSE;
}
}
}
}
}
return isset($map[$component]) ? $map[$component] : FALSE;
}