protected function FieldResolver::getIdFieldName in JSON:API 8.2
Resolves the UUID field name for a resource type.
Parameters
\Drupal\jsonapi\ResourceType\ResourceType $resource_type: The resource type for which to get the UUID field name.
Return value
string The resolved internal name.
1 call to FieldResolver::getIdFieldName()
- FieldResolver::getInternalName in src/
Context/ FieldResolver.php - Resolves the internal field name based on a collection of resource types.
File
- src/
Context/ FieldResolver.php, line 490
Class
- FieldResolver
- A service that evaluates external path expressions against Drupal fields.
Namespace
Drupal\jsonapi\ContextCode
protected function getIdFieldName(ResourceType $resource_type) {
$entity_type = $this->entityTypeManager
->getDefinition($resource_type
->getEntityTypeId());
return $entity_type
->getKey('uuid');
}