equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 /** |
|
4 * @file |
|
5 * Hooks provided by Contextual module. |
|
6 */ |
|
7 |
|
8 /** |
|
9 * @addtogroup hooks |
|
10 * @{ |
|
11 */ |
|
12 |
|
13 /** |
|
14 * Alter a contextual links element before it is rendered. |
|
15 * |
|
16 * This hook is invoked by contextual_pre_render_links(). The renderable array |
|
17 * of #type 'contextual_links', containing the entire contextual links data that |
|
18 * is passed in by reference. Further links may be added or existing links can |
|
19 * be altered. |
|
20 * |
|
21 * @param $element |
|
22 * A renderable array representing the contextual links. |
|
23 * @param $items |
|
24 * An associative array containing the original contextual link items, as |
|
25 * generated by menu_contextual_links(), which were used to build |
|
26 * $element['#links']. |
|
27 * |
|
28 * @see hook_menu_contextual_links_alter() |
|
29 * @see contextual_pre_render_links() |
|
30 * @see contextual_element_info() |
|
31 */ |
|
32 function hook_contextual_links_view_alter(&$element, $items) { |
|
33 // Add another class to all contextual link lists to facilitate custom |
|
34 // styling. |
|
35 $element['#attributes']['class'][] = 'custom-class'; |
|
36 } |
|
37 |
|
38 /** |
|
39 * @} End of "addtogroup hooks". |
|
40 */ |