protected function ContentExporter::mapToUuid in Commerce Demo 8
Same name and namespace in other branches
- 8.2 src/ContentExporter.php \Drupal\commerce_demo\ContentExporter::mapToUuid()
Maps an entity ID to a UUID.
Parameters
string $entity_type_id: The entity type ID.
int $entity_id: The entity ID.
Return value
string|null The entity UUID, or NULL if the entity no longer exists.
2 calls to ContentExporter::mapToUuid()
- ContentExporter::export in src/
ContentExporter.php - Exports the given entity.
- ContentExporter::processTerm in src/
ContentExporter.php - Processes the exported taxonomy term.
File
- src/
ContentExporter.php, line 316
Class
- ContentExporter
- Defines the content exporter.
Namespace
Drupal\commerce_demoCode
protected function mapToUuid($entity_type_id, $entity_id) {
$storage = $this->entityTypeManager
->getStorage($entity_type_id);
$entity = $storage
->load($entity_id);
return $entity ? $entity
->uuid() : NULL;
}