-
Notifications
You must be signed in to change notification settings - Fork 0
/
sapi.api.php
53 lines (46 loc) · 1.12 KB
/
sapi.api.php
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
<?php
/**
* @file
* Hooks provided by the Statistics API module.
*/
/**
* @defgroup sapi_hooks Statistics API Hooks
* @{
* Functions to define and modify Statistics methods and structures and other
* associated functionality.
* @todo Add additional detail here.
* @}
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Modify Stat Method definitions.
*
* @param array $info
* An associative array of Stat Method definitions, keyed by Stat Method IDs.
*
* @see \Drupal\sapi\Annotation\StatMethod
* @see \Drupal\sapi\Plugin\StatPluginManager
*/
function hook_sapi_method_info_alter(&$info) {
// Use a different instance class for my_method.
$info['my_method']['class'] = '\Foo\bar\MyMethodClass';
}
/**
* Modify Stat Data definitions.
*
* @param array $info
* An associative array of Stat Data definitions, keyed by Stat Data ID.
*
* @see \Drupal\sapi\Annotation\StatData
* @see \Drupal\sapi\Plugin\StatPluginManager
*/
function hook_sapi_data_info_alter(&$info) {
// Modify the default Stat Data description.
$info['my_data']['description'] = t('My new description.');
}
/**
* @} End of "addtogroup hooks".
*/