You are here

function gauth_google_services_names in Google Auth 7

Same name and namespace in other branches
  1. 8 gauth.module \gauth_google_services_names()
  2. 7.2 gauth.module \gauth_google_services_names()

Returns a array services api names.

4 calls to gauth_google_services_names()
gauth_account_edit_form in ./gauth.admin.inc
Form builder; Edit an account.
gauth_user_services_edit_form in gauth_user/gauth_user.admin.inc
Form builder; Edit an services account.
theme_gauth_account_list in ./gauth.admin.inc
Returns HTML for the page containing the list of accounts.
theme_gauth_user_services_list in gauth_user/gauth_user.admin.inc
Returns HTML for the page containing the list of accounts.

File

./gauth.module, line 247
Google Auth Api for drupal.

Code

function gauth_google_services_names($services = FALSE) {
  $names = variable_get('gauth_google_api_services', array());
  if (empty($names)) {
    _gauth_read_scope_info();
    $names = variable_get('gauth_google_api_services', array());
  }
  if (!$services) {
    return $names;
  }
  else {
    $service_names = array();
    foreach (explode(",", $services) as $service) {
      $service_names[trim($service)] = $names[$service];
    }
    return $service_names;
  }
}