1 telemetry.api.php | hook_telemetry_info() |
Provides information about data collected by this module.
Return value
array $info: An array of Telemetry data that will be collected. Keyed by a unique identifier. Contributed modules should prefix this key with the name of their module, such as "example_setting_1" for a module named "example". Values within the array include the keys:
- label: A translated label for the data being collected.
- description: A translated description of the data being collected.
- project: The name of the project on BackdropCMS.org with which this value should be associated. Use this if the project name is not the same as the module name, or if the project contains multiple modules.
Related topics
File
- core/
modules/ telemetry/ telemetry.api.php, line 26 - Hooks provided by the Telemetry module.
Code
function hook_telemetry_info() {
// If this were in my_module.module, "project" would assume to be "my_module".
$info['my_module_setting_1'] = array(
'label' => t('My module setting 1'),
'description' => t('Some information about what setting 1 is.'),
);
// If this were in submodule.module, specify the project name explicitly.
$info['my_module_submodule_setting_2'] = array(
'label' => t('Submodule setting 2'),
'description' => t('A description describing this setting of a sub-module.'),
'project' => 'my_module',
);
return $info;
}