function configuration_hook in Configuration Management 7
Checks whether a component implements the given hook.
Return value
The function implementing the hook, or FALSE.
6 calls to configuration_hook()
- configuration_export_render_hooks in ./
configuration.export.inc - Generate an array of hooks and their raw code.
- configuration_get_component_states in ./
configuration.export.inc - Retrieve an array of configuration/components and their current states.
- configuration_get_normal in ./
configuration.export.inc - Get normal objects for a given module/component pair.
- configuration_invoke in ./
configuration.module - Invoke a component callback.
- _configuration_populate in ./
configuration.export.inc - Iterate and descend into a feature definition to extract module dependencies and feature definition. Calls hook_configuration_export for modules that implement it.
File
- ./
configuration.module, line 516 - Module file for the configuration module, which enables the capture and management of configuration in Drupal.
Code
function configuration_hook($component, $hook, $reset = FALSE) {
$info =& drupal_static(__FUNCTION__);
if (!isset($info) || $reset) {
$info = module_invoke_all('configuration_api');
}
// Determine the function callback base.
$base = isset($info[$component]['base']) ? $info[$component]['base'] : $component;
return function_exists($base . '_' . $hook) ? $base . '_' . $hook : FALSE;
}