You are here

function analytics_service_add_service_options in Analytics 7

2 calls to analytics_service_add_service_options()
AnalyticsServiceExportUI::access in lib/export_ui/AnalyticsServiceExportUI.class.php
Menu callback to determine if an operation is accessible.
analytics_service_edit_form in lib/export_ui/analytics_service_export_ui.inc

File

./analytics.module, line 172

Code

function analytics_service_add_service_options() {
  $results = array();
  foreach (analytics_get_service_info(NULL, TRUE) as $key => $service) {
    if (!empty($service['multiple'])) {
      $results[$key] = $service['label'];
    }
    else {
      ctools_include('export');
      if (ctools_export_load_object('analytics_service', 'conditions', array(
        'service' => $key,
      ))) {
        continue;
      }
      $results[$key] = $service['label'];
    }
  }
  return $results;
}