function module_builder_get_hook_data in Module Builder 7
Same name and namespace in other branches
- 5 module_builder.module \module_builder_get_hook_data()
- 6.2 includes/process.inc \module_builder_get_hook_data()
Retrieve hook data from storage file.
6 calls to module_builder_get_hook_data()
- module_builder_callback_hook_list in drush/
module_builder.drush.inc - Callback to list known hooks.
- module_builder_get_hook_data_flat in includes/
process.inc - Helper for API functions that don't care about file grouping.
- module_builder_get_hook_declarations in includes/
process.inc - Get stored hook declarations, keyed by hook name, with destination.
- module_builder_get_hook_declarations_plain in includes/
process.inc - Get just hook declarations, keyed by hook name.
- module_builder_page_input in includes/
module_builder.pages.inc
File
- includes/
process.inc, line 93 - Module builder code processing code.
Code
function module_builder_get_hook_data($directory = NULL) {
if (!isset($directory)) {
//$directory = file_create_path(variable_get('module_builder_hooks_directory', 'hooks'));
$directory = _module_builder_get_hooks_directory();
}
$hooks_file = "{$directory}/hooks_processed.php";
if (file_exists($hooks_file)) {
return unserialize(file_get_contents($hooks_file));
}
}