public function SecretInfo::setSecretInfo in Lockr 8.4
Same name and namespace in other branches
- 8.3 src/SecretInfo.php \Drupal\lockr\SecretInfo::setSecretInfo()
- 4.x src/SecretInfo.php \Drupal\lockr\SecretInfo::setSecretInfo()
File
- src/
SecretInfo.php, line 77
Class
- SecretInfo
- SecretInfo implements secret info for Lockr secrets.
Namespace
Drupal\lockrCode
public function setSecretInfo($name, array $info) {
$secret = $this->secretStorage
->load($name);
if (is_null($secret)) {
$secret = $this->secretStorage
->create([
'id' => $name,
'key_id' => $name,
]);
}
$secret
->setInfo($info);
$secret
->save();
}