protected function EncryptedFieldValueManager::getEntityRevisionId in Field Encryption 8.2
Get the revision ID to store for a given entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity to check.
Return value
int The revision ID.
3 calls to EncryptedFieldValueManager::getEntityRevisionId()
- EncryptedFieldValueManager::createEncryptedFieldValue in src/
EncryptedFieldValueManager.php - Create an encrypted field value, or update an existing one.
- EncryptedFieldValueManager::deleteEntityEncryptedFieldValuesForField in src/
EncryptedFieldValueManager.php - Delete encrypted field values on a given entity for a specific field.
- EncryptedFieldValueManager::saveEncryptedFieldValues in src/
EncryptedFieldValueManager.php - Save encrypted field values and link them to their parent entity.
File
- src/
EncryptedFieldValueManager.php, line 163
Class
- EncryptedFieldValueManager
- Manager containing common functions to manage EncryptedFieldValue entities.
Namespace
Drupal\field_encryptCode
protected function getEntityRevisionId(ContentEntityInterface $entity) {
if ($entity
->isNew()) {
return NULL;
}
return $entity
->getEntityType()
->hasKey('revision') ? $entity
->getRevisionId() : $entity
->id();
}