protected static function EntityReferenceFieldNormalizer::hasNonInternalResourceType in JSON:API 8.2
Determines if a given list of resource types contains a non-internal type.
Parameters
\Drupal\jsonapi\ResourceType\ResourceType[] $resource_types: The JSON:API resource types to evaluate.
Return value
bool FALSE if every resource type is internal, TRUE otherwise.
1 call to EntityReferenceFieldNormalizer::hasNonInternalResourceType()
- EntityReferenceFieldNormalizer::getRelationshipLinks in src/
Normalizer/ EntityReferenceFieldNormalizer.php - Gets the links for the relationship.
File
- src/
Normalizer/ EntityReferenceFieldNormalizer.php, line 111
Class
- EntityReferenceFieldNormalizer
- Normalizer class specific for entity reference field objects.
Namespace
Drupal\jsonapi\NormalizerCode
protected static function hasNonInternalResourceType(array $resource_types) {
foreach ($resource_types as $resource_type) {
if (!$resource_type
->isInternal()) {
return TRUE;
}
}
return FALSE;
}