function features_hook in Features 7
Same name and namespace in other branches
- 6 features.module \features_hook()
- 7.2 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. Optionally accept a list of components to revert.
- 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 534 - 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) {
// Determine the function callback base.
$base = features_get_components($component, 'base');
$base = isset($base) ? $base : $component;
return function_exists($base . '_' . $hook) ? $base . '_' . $hook : FALSE;
}