8.5.x Entity.php Entity::uuid()
8.0.x Entity.php Entity::uuid()
8.1.x Entity.php Entity::uuid()
8.2.x Entity.php Entity::uuid()
8.3.x Entity.php Entity::uuid()
8.4.x Entity.php Entity::uuid()
8.6.x Entity.php Entity::uuid()

Gets the entity UUID (Universally Unique Identifier).

The UUID is guaranteed to be unique and can be used to identify an entity across multiple systems.

Return value

string|null The UUID of the entity, or NULL if the entity does not have one.

Overrides EntityInterface::uuid

3 calls to Entity::uuid()
Entity::getConfigDependencyName in core/lib/Drupal/Core/Entity/Entity.php
Gets the configuration dependency name.
Entity::getConfigTarget in core/lib/Drupal/Core/Entity/Entity.php
Gets the configuration target identifier for the entity.
FieldStorageConfig::getUniqueStorageIdentifier in core/modules/field/src/Entity/FieldStorageConfig.php
Returns a unique identifier for the field.
1 method overrides Entity::uuid()
ContentEntityBase::uuid in core/lib/Drupal/Core/Entity/ContentEntityBase.php
Gets the entity UUID (Universally Unique Identifier).

File

core/lib/Drupal/Core/Entity/Entity.php, line 118

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function uuid() {
  return isset($this->uuid) ? $this->uuid : NULL;
}