function ResourceType::getFieldByInternalName
Same name in other branches
- 8.9.x core/modules/jsonapi/src/ResourceType/ResourceType.php \Drupal\jsonapi\ResourceType\ResourceType::getFieldByInternalName()
- 10 core/modules/jsonapi/src/ResourceType/ResourceType.php \Drupal\jsonapi\ResourceType\ResourceType::getFieldByInternalName()
- 11.x core/modules/jsonapi/src/ResourceType/ResourceType.php \Drupal\jsonapi\ResourceType\ResourceType::getFieldByInternalName()
Gets a particular attribute or relationship field by internal field name.
Parameters
string $internal_field_name: The internal field name of the desired field.
Return value
\Drupal\jsonapi\ResourceType\ResourceTypeField|null A resource type field object or NULL if the field does not exist on this resource type.
1 call to ResourceType::getFieldByInternalName()
- ResourceType::getFieldByPublicName in core/
modules/ jsonapi/ src/ ResourceType/ ResourceType.php - Gets a particular attribute or relationship field by public field name.
File
-
core/
modules/ jsonapi/ src/ ResourceType/ ResourceType.php, line 216
Class
- ResourceType
- Value object containing all metadata for a JSON:API resource type.
Namespace
Drupal\jsonapi\ResourceTypeCode
public function getFieldByInternalName($internal_field_name) {
return $this->fields[$internal_field_name] ?? NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.