You are here

public function PardotClient::isInit in Pardot Integration 2.x

Return true if we have all the info to potentially make a proper api call.

Return value

bool Bool true or false

Overrides PardotClientInterface::isInit

1 call to PardotClient::isInit()
PardotClient::authenticate in src/Service/PardotClient.php
Authenticate into Pardot API and return the API Key.

File

src/Service/PardotClient.php, line 136

Class

PardotClient
Provides methods to execute Pardot API operations.

Namespace

Drupal\pardot\Service

Code

public function isInit() {
  if (!$this->authProvider || !$this->authToken || !$this->authManager || !$this->apibaseUrl || !$this->businessId) {
    $this->logger
      ->error($this
      ->t('Unable to authenticate into Pardot API. One of the required parameters is missing'));
    return FALSE;
  }
  return TRUE;
}