public function AutoConnector::connectToAcquia in Acquia Connector 8.2
Same name and namespace in other branches
- 8 src/AutoConnector.php \Drupal\acquia_connector\AutoConnector::connectToAcquia()
- 3.x src/AutoConnector.php \Drupal\acquia_connector\AutoConnector::connectToAcquia()
Ensures a connection to Acquia Subscription.
Return value
mixed False or whatever is returned by Subscription::update.
File
- src/
AutoConnector.php, line 57
Class
- AutoConnector
- Subscription Auto connector storage.
Namespace
Drupal\acquia_connectorCode
public function connectToAcquia() {
if ($this->subscription
->hasCredentials()) {
return FALSE;
}
if (empty($this->globalConfig['ah_network_key'])) {
return FALSE;
}
if (empty($this->globalConfig['ah_network_identifier'])) {
return FALSE;
}
$this->storage
->setKey($this->globalConfig['ah_network_key']);
$this->storage
->setIdentifier($this->globalConfig['ah_network_identifier']);
return $this->subscription
->update();
}