function features_hook in Features 6
Same name and namespace in other branches
- 7.2 features.module \features_hook()
- 7 features.module \features_hook()
Checks whether a component implements the given hook.
Return value
The function implementing the hook, or FALSE.
8 calls to features_hook()
- drush_features_revert in ./
features.drush.inc - Revert a feature to it's code definition.
- features_export_render_hooks in ./
features.export.inc - Generate an array of hooks and their raw code.
- features_get_component_states in ./
features.export.inc - Retrieve an array of features/components and their current states.
- features_get_normal in ./
features.export.inc - Get normal objects for a given module/component pair.
- features_invoke in ./
features.module - Invoke a component callback.
1 string reference to 'features_hook'
- features_update_6101 in ./
features.install - Update 6101: Set codestate signature for all features.
File
- ./
features.module, line 415 - Module file for the features module, which enables the capture and management of features in Drupal. A feature is a collection of Drupal entities which taken together statisfy a certain use-case.
Code
function features_hook($component, $hook, $reset = FALSE) {
static $info;
if (!isset($info) || $reset) {
$info = module_invoke_all('features_api');
}
// Determine the function callback base.
$base = isset($info[$component]['base']) ? $info[$component]['base'] : $component;
return function_exists($base . '_' . $hook) ? $base . '_' . $hook : FALSE;
}