You are here

function _better_statistics_update_methods in Better Statistics 7

Rebuilds the Better Statistics Methods variable based on entries provided by implementations of hook_better_statistics_methods(). This is kept here and run only occasionally because method additions are rare and do not need to be re-generated dynamically at run time on every request.

3 calls to _better_statistics_update_methods()
better_statistics_disable_fields in ./better_statistics.admin.inc
Disables a list of statistics fields.
better_statistics_enable_fields in ./better_statistics.admin.inc
Enables a list of statistics fields.
better_statistics_flush_caches in ./better_statistics.module
Implements hook_flush_caches().

File

./better_statistics.admin.inc, line 525
Admin and config code for the Better Statistics module.

Code

function _better_statistics_update_methods() {
  $methods = module_invoke_all('better_statistics_methods');

  // Only save off the methods if there are any.
  if (!empty($methods)) {
    variable_set('better_statistics_methods', $methods);
  }
}