protected function PreviewLinkStorage::generateUniqueToken in Preview Link 8
Gets the unique token for the link.
This token is unique every time we generate a link, there is nothing from the original entity involved in the token so it does not need to be cryptographically secure, only sufficiently random which UUID is.
Return value
string A unique identifier for this preview link.
2 calls to PreviewLinkStorage::generateUniqueToken()
- PreviewLinkStorage::create in src/
PreviewLinkStorage.php - Constructs a new entity object, without permanently saving it.
- PreviewLinkStorage::save in src/
PreviewLinkStorage.php - Saves the entity permanently.
File
- src/
PreviewLinkStorage.php, line 147
Class
- PreviewLinkStorage
- Preview Link entity storage.
Namespace
Drupal\preview_linkCode
protected function generateUniqueToken() {
return $this->uuidService
->generate();
}