public function ResourceObject::hasField in JSON:API 8.2
Whether the resource object has the given field.
Parameters
string $public_field_name: A public field name.
Return value
bool TRUE if the resource object has the given field, FALSE otherwise.
1 call to ResourceObject::hasField()
- ResourceObject::getField in src/
JsonApiResource/ ResourceObject.php - Gets the given field.
File
- src/
JsonApiResource/ ResourceObject.php, line 124
Class
- ResourceObject
- Represents a JSON:API resource object.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function hasField($public_field_name) {
return isset($this->fields[$public_field_name]);
}