protected function FieldResolver::getIdFieldName in Drupal 9
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::getIdFieldName()
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 core/
modules/ jsonapi/ src/ Context/ FieldResolver.php - Resolves the internal field name based on a collection of resource types.
File
- core/
modules/ jsonapi/ src/ Context/ FieldResolver.php, line 512
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');
}