public static function TomeSyncHelper::getContentNameFromParts in Tome 8
Gets the content name based on parts.
This can be used to read/write from the tome_sync.storage.content service.
Parameters
string $entity_type_id: The entity type ID.
string $uuid: The entity UUID.
string $langcode: (optional) The langcode, for translations.
Return value
string A string representing the content name.
2 calls to TomeSyncHelper::getContentNameFromParts()
- ContentIndexerTrait::indexContent in modules/
tome_sync/ src/ ContentIndexerTrait.php - Writes content to the index.
- Importer::loadEntityFromStorage in modules/
tome_sync/ src/ Importer.php - Loads an entity from the content storage.
File
- modules/
tome_sync/ src/ TomeSyncHelper.php, line 50
Class
- TomeSyncHelper
- Provides helpers for the Tome Sync module.
Namespace
Drupal\tome_syncCode
public static function getContentNameFromParts($entity_type_id, $uuid, $langcode = NULL) {
if ($langcode) {
return "{$entity_type_id}.{$uuid}.{$langcode}";
}
else {
return "{$entity_type_id}.{$uuid}";
}
}