protected static function FieldNormalizer::isRelationship in JSON:API 8
Checks if the passed field is a relationship field.
Parameters
mixed $field: The field.
Return value
bool TRUE if it's a JSON API relationship.
1 call to FieldNormalizer::isRelationship()
- FieldNormalizer::normalize in src/
Normalizer/ FieldNormalizer.php - Normalizes an object into a set of arrays/scalars.
File
- src/
Normalizer/ FieldNormalizer.php, line 68
Class
- FieldNormalizer
- Converts the Drupal field structure to a JSON API array structure.
Namespace
Drupal\jsonapi\NormalizerCode
protected static function isRelationship($field) {
return $field instanceof EntityReferenceFieldItemList || $field instanceof Relationship;
}