public function ResourceType::getPublicName in JSON:API 8.2
Same name and namespace in other branches
- 8 src/ResourceType/ResourceType.php \Drupal\jsonapi\ResourceType\ResourceType::getPublicName()
Translates the entity field name to the public field name.
This is only here so we can allow polymorphic implementations to take a greater control on the field names.
Return value
string The public field name.
File
- src/
ResourceType/ ResourceType.php, line 161
Class
- ResourceType
- Value object containing all metadata for a JSON:API resource type.
Namespace
Drupal\jsonapi\ResourceTypeCode
public function getPublicName($field_name) {
// By default the entity field name is the public field name.
return isset($this->fieldMapping[$field_name]) ? $this->fieldMapping[$field_name] : $field_name;
}