You are here

public function RestClient::enableEncryption in Salesforce Suite 8.3

Encrypts all sensitive salesforce config values.

Parameters

\Drupal\encrypt\EncryptionProfileInterface $profile: Id of the Encrypt Profile to use for encryption.

Return value

bool TRUE if encryption was enabled or FALSE if it is already enabled

Throws

RuntimeException If Salesforce encryption profile hasn't been selected.

Overrides EncryptedRestClientInterface::enableEncryption

File

modules/salesforce_encrypt/src/Rest/RestClient.php, line 93

Class

RestClient
Objects, properties, and methods to communicate with the Salesforce REST API.

Namespace

Drupal\salesforce_encrypt\Rest

Code

public function enableEncryption(EncryptionProfileInterface $profile) {
  if ($ret = $this
    ->setEncryption($profile)) {
    $this->state
      ->resetCache();
  }
  return $ret;
}