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

Gets the UUID generator.

Return value

\Drupal\Component\Uuid\UuidInterface

File

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

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

protected function uuidGenerator() {
  return \Drupal::service('uuid');
}