protected static function EntityReferenceFieldNormalizer::hasNonInternalResourceType in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/src/Normalizer/EntityReferenceFieldNormalizer.php \Drupal\jsonapi\Normalizer\EntityReferenceFieldNormalizer::hasNonInternalResourceType()
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 core/
modules/ jsonapi/ src/ Normalizer/ EntityReferenceFieldNormalizer.php - Gets the links for the relationship.
File
- core/
modules/ jsonapi/ src/ Normalizer/ EntityReferenceFieldNormalizer.php, line 109
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;
}