You are here

function hook_statistics_api in Better Statistics 7

Register Statistics API information. This is required for your module to have its include files loaded.

Return value

An array with the following possible keys:

  • api: (required) The version of the Statistics API the module implements. The current version of the API is 1.0.
  • path: (optional) If the include is stored somewhere other than within the root module directory, specify its path here.
  • file: (optional) If the include's file name is anything other than MODULE.statistics.inc, specify it here.

Related topics

1 function implements hook_statistics_api()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

better_statistics_statistics_api in ./better_statistics.module
Implements hook_statistics_api().

File

./better_statistics.api.php, line 37
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_statistics_api() {

  // In this example, Better Statistics hooks and callbacks would be located
  // somewhere like: /sites/all/modules/example/statistics/stats_fields.inc
  return array(
    'version' => 1,
    'path' => drupal_get_path('module', 'example') . '/statistics',
    'file' => 'stats_fields.inc',
  );
}