You are here

public function GoogleApiClient::getServices in Google API PHP Client 8.3

Same name and namespace in other branches
  1. 8.4 src/Entity/GoogleApiClient.php \Drupal\google_api_client\Entity\GoogleApiClient::getServices()
  2. 8.2 src/Entity/GoogleApiClient.php \Drupal\google_api_client\Entity\GoogleApiClient::getServices()

Function returns the Services for the account.

Return value

array Returns array of services.

Overrides GoogleApiClientInterface::getServices

3 calls to GoogleApiClient::getServices()
GoogleApiClient::getScopes in src/Entity/GoogleApiClient.php
Function returns the Scopes for the account.
GoogleApiClient::save in src/Entity/GoogleApiClient.php
GoogleApiClient::setScopes in src/Entity/GoogleApiClient.php
Function set Scopes.

File

src/Entity/GoogleApiClient.php, line 195

Class

GoogleApiClient
Defines the GoogleApiClient entity.

Namespace

Drupal\google_api_client\Entity

Code

public function getServices() {
  $services = $this
    ->get('services')
    ->getValue();
  $return = [];
  foreach ($services as $key => $service) {
    $return[$key] = $service['value'];
  }
  return $return;
}