You are here

public function GoogleApiClientService::setGoogleApiClient in Google API PHP Client 8.2

Same name and namespace in other branches
  1. 8.4 src/Service/GoogleApiClientService.php \Drupal\google_api_client\Service\GoogleApiClientService::setGoogleApiClient()
  2. 8.3 src/Service/GoogleApiClientService.php \Drupal\google_api_client\Service\GoogleApiClientService::setGoogleApiClient()

Function to set the GoogleApiClient account for the service.

Parameters

\Drupal\google_api_client\GoogleApiClientInterface $google_api_client: Pass completely loaded GoogleApiClient object.

Throws

\Drupal\Core\Entity\EntityStorageException

File

src/Service/GoogleApiClientService.php, line 67

Class

GoogleApiClientService
Class Google API Client Service.

Namespace

Drupal\google_api_client\Service

Code

public function setGoogleApiClient(GoogleApiClientInterface $google_api_client) {
  $this->googleApiClient = $google_api_client;

  // Add the client.
  $this
    ->getClient();
}