public function DeployManager::getEntityUuidById in Default Content Deploy 8
Get UUID of entity.
Parameters
$entity_type: Entity type ID.
$id: ID of entity.
Return value
string UUID value.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
File
- src/
DeployManager.php, line 86
Class
Namespace
Drupal\default_content_deployCode
public function getEntityUuidById($entity_type, $id) {
$entity = $this->entityTypeManager
->getStorage($entity_type)
->load($id);
return $entity
->uuid();
}