You are here

public function ConfigurableResourceType::getPublicName in JSON:API Extras 8

Same name and namespace in other branches
  1. 8.2 src/ResourceType/ConfigurableResourceType.php \Drupal\jsonapi_extras\ResourceType\ConfigurableResourceType::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.

Overrides ResourceType::getPublicName

File

src/ResourceType/ConfigurableResourceType.php, line 74

Class

ConfigurableResourceType
Defines a configurable resource type.

Namespace

Drupal\jsonapi_extras\ResourceType

Code

public function getPublicName($field_name) {
  return $this
    ->translateFieldName($field_name, 'fieldName', 'publicName');
}