public function ResourceTypeField::withPublicName in Drupal 9
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/ResourceType/ResourceTypeField.php \Drupal\jsonapi\ResourceType\ResourceTypeField::withPublicName()
- 10 core/modules/jsonapi/src/ResourceType/ResourceTypeField.php \Drupal\jsonapi\ResourceType\ResourceTypeField::withPublicName()
Establishes a new public name for the field.
Parameters
string $public_name: The public name.
Return value
static A new instance of the field with the given public name.
1 call to ResourceTypeField::withPublicName()
- ResourceTypeRelationship::withPublicName in core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeRelationship.php - Establishes a new public name for the field.
1 method overrides ResourceTypeField::withPublicName()
- ResourceTypeRelationship::withPublicName in core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeRelationship.php - Establishes a new public name for the field.
File
- core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeField.php, line 94
Class
- ResourceTypeField
- Abstract value object containing all metadata for a JSON:API resource field.
Namespace
Drupal\jsonapi\ResourceTypeCode
public function withPublicName($public_name) {
return new static($this->internalName, $public_name, $this->enabled, $this->hasOne);
}