protected function Subscription::ensureSecret in Feeds 8.3
Ensures that this subscription has a valid secret.
2 calls to Subscription::ensureSecret()
- Subscription::preSave in src/
Entity/ Subscription.php - Acts on an entity before the presave hook is invoked.
- Subscription::validateState in src/
Entity/ Subscription.php - Validates the state of the subscription.
File
- src/
Entity/ Subscription.php, line 150
Class
- Subscription
- Defines the subscription entity class.
Namespace
Drupal\feeds\EntityCode
protected function ensureSecret() {
if (!$this
->getSecret()) {
$this
->set('secret', substr(Crypt::randomBytesBase64(32), 0, 32));
}
}