-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhap.hooks.inc
101 lines (88 loc) · 2.41 KB
/
hap.hooks.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
/**
* @file
* This file contains all the hooks that are potentially utilized by any of
* the tools. Always wrap each function with `hap_uses_hook()` to prevent
* declaring a hook when it is not necessary. Each hook will use `hap_proxy`
* to delegate tools-specific logic to each corresponding tool's "pseudo-hook".
*/
/**
* Implements hook_menu().
*/
if (hap_uses_hook('menu')) {
function hap_menu() {
return hap_proxy('menu');
}
}
/**
* Implements hook_menu_alter().
*/
if (hap_uses_hook('menu_alter')) {
function hap_menu_alter(&$items) {
return hap_proxy('menu_alter', $items);
}
}
/**
* Implements hook_theme().
*/
if (hap_uses_hook('theme')) {
function hap_theme($existing, $type, $theme, $path) {
return hap_proxy('theme', $existing, $type, $theme, $path);
}
}
/**
* Implements hook_url_outbound_alter().
*/
if (hap_uses_hook('url_outbound_alter')) {
function hap_url_outbound_alter(&$path, &$options, $original_path) {
hap_proxy('url_outbound_alter', $path, $options, $original_path);
}
}
/**
* Implements hook_page_build().
*/
if (hap_uses_hook('page_build')) {
function hap_page_build(&$page) {
hap_proxy('page_build', $page);
}
}
/**
* Implements hook_modules_enabled().
*/
if (hap_uses_hook('modules_enabled')) {
function hap_modules_enabled($modules) {
hap_proxy('modules_enabled', $modules);
}
}
/**
* Implements hook_ctools_render_alter().
*/
if (hap_uses_hook('ctools_render_alter')) {
function hap_ctools_render_alter($info, $page, $context) {
hap_proxy('ctools_render_alter', $info, $page, $context);
}
}
/**
* Implements hook_form_panels_panel_context_edit_content_alter().
*/
if (hap_uses_hook('form_panels_panel_context_edit_content_alter')) {
function hap_form_panels_panel_context_edit_content_alter(&$form, &$form_state) {
hap_proxy('form_panels_panel_context_edit_content_alter', $form, $form_state);
}
}
/**
* Implements hook_form_panels_panel_context_edit_settings_alter().
*/
if (hap_uses_hook('form_panels_panel_context_edit_settings_alter')) {
function hap_form_panels_panel_context_edit_settings_alter(&$form, &$form_state) {
hap_proxy('form_panels_panel_context_edit_settings_alter', $form, $form_state);
}
}
/**
* Implements hook_panels_post_render().
*/
if (hap_uses_hook('panels_post_render')) {
function hap_panels_post_render($display, $renderer) {
hap_proxy('panels_post_render', $display, $renderer);
}
}