function gauth_google_services_names in Google Auth 8
Same name and namespace in other branches
- 7.2 gauth.module \gauth_google_services_names()
- 7 gauth.module \gauth_google_services_names()
Returns a array services api names.
1 call to gauth_google_services_names()
- GauthListBuilder::buildRow in src/
Entity/ Controller/ GauthListBuilder.php - Builds a row for an entity in the entity listing.
File
- ./
gauth.module, line 80 - Google Auth Api for drupal.
Code
function gauth_google_services_names($field, $entity, $cardinality, $services = FALSE) {
$names = \Drupal::config('gauth.google_api_services')
->get('gauth_google_api_services');
if (empty($names)) {
_gauth_read_scope_info();
$names = \Drupal::config('gauth.google_api_services')
->get('gauth_google_api_services');
}
if (!$services) {
return $names;
}
else {
$service_names = array();
if (!is_array($services)) {
$services = explode(",", $services);
}
foreach ($services as $service) {
$service_names[trim($service)] = $names[$service];
}
return $service_names;
}
}