1 |
5189a8ec
|
Andreas Kohlbecker
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Hooks provided by the CDM DataPortal module.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* @addtogroup hooks
|
10 |
|
|
* @{
|
11 |
|
|
*/
|
12 |
|
|
|
13 |
|
|
/**
|
14 |
|
|
* Alter the feature toc items.
|
15 |
|
|
*
|
16 |
|
|
* Modules implementing this hook can add, remove or modify
|
17 |
|
|
* the items in the table of contents of features.
|
18 |
|
|
*
|
19 |
|
|
* the items array is an array suitable for theme_item_list().
|
20 |
|
|
*
|
21 |
|
|
*/
|
22 |
|
|
function hook_cdm_feature_node_toc_items_alter($items) {
|
23 |
|
|
|
24 |
|
|
// NOTE: drupal_get_query_parameters has no internal static cache variable
|
25 |
|
|
$http_request_params = drupal_get_query_parameters();
|
26 |
|
|
|
27 |
|
|
$items[] = array(
|
28 |
|
|
// a html link element as item:
|
29 |
|
|
l(
|
30 |
|
|
theme('cdm_feature_name', array('feature_name' => 'My new feature item')),
|
31 |
|
|
$_GET['q'],
|
32 |
|
|
array(
|
33 |
|
|
'attributes' => array('class' => array('toc')),
|
34 |
|
|
'fragment' => generalizeString('My new feature item'),
|
35 |
|
|
'query' => $http_request_params
|
36 |
|
|
)
|
37 |
|
|
)
|
38 |
|
|
);
|
39 |
|
|
|
40 |
|
|
return $items;
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
/**
|
44 |
|
|
* @} End of "addtogroup hooks".
|
45 |
|
|
*/
|