public function RestClient::getEncryptionProfile in Salesforce Suite 8.3
Returns the EncryptionProfileInterface assigned to Salesforce Encrypt.
Return value
\Drupal\encrypt\EncryptionProfileInterface|null The assigned profile, or null if none has been assigned.
Throws
\Drupal\salesforce\EntityNotFoundException If a profile is assigned, but cannot be loaded.
Overrides EncryptedRestClientInterface::getEncryptionProfile
1 call to RestClient::getEncryptionProfile()
- RestClient::doGetEncryptionProfile in modules/
salesforce_encrypt/ src/ Rest/ RestClient.php - Exception-handling wrapper around getEncryptionProfile().
File
- modules/
salesforce_encrypt/ src/ Rest/ RestClient.php, line 154
Class
- RestClient
- Objects, properties, and methods to communicate with the Salesforce REST API.
Namespace
Drupal\salesforce_encrypt\RestCode
public function getEncryptionProfile() {
if ($this->encryptionProfile) {
return $this->encryptionProfile;
}
elseif (empty($this->encryptionProfileId)) {
return NULL;
}
else {
$this->encryptionProfile = $this->encryptionProfileManager
->getEncryptionProfile($this->encryptionProfileId);
if (empty($this->encryptionProfile)) {
throw new EntityNotFoundException([
'id' => $this->encryptionProfileId,
], 'encryption_profile');
}
return $this->encryptionProfile;
}
}