You are here

function configuration_get_default_hooks in Configuration Management 7

Gets the available default hooks keyed by components.

3 calls to configuration_get_default_hooks()
configuration_get_default in ./configuration.export.inc
Get defaults for a given module/component pair.
configuration_get_default_map in ./configuration.export.inc
Get a map of components to their providing modules.
configuration_get_normal in ./configuration.export.inc
Get normal objects for a given module/component pair.

File

./configuration.export.inc, line 234

Code

function configuration_get_default_hooks($component = NULL, $reset = FALSE) {
  static $hooks;
  if (!isset($hooks) || $reset) {
    $hooks = array();
    configuration_include();
    foreach (module_implements('configuration_api') as $module) {
      $info = module_invoke($module, 'configuration_api');
      foreach ($info as $k => $v) {
        if (isset($v['default_hook'])) {
          $hooks[$k] = $v['default_hook'];
        }
      }
    }
  }
  if (isset($component)) {
    return isset($hooks[$component]) ? $hooks[$component] : FALSE;
  }
  return $hooks;
}