public static function ResourceIdentifier::areResourceIdentifiersUnique in Drupal 9
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::areResourceIdentifiersUnique()
- 10 core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::areResourceIdentifiersUnique()
Determines if an array of ResourceIdentifier objects is duplicate free.
Parameters
\Drupal\jsonapi\JsonApiResource\ResourceIdentifier[] $resource_identifiers: The list of ResourceIdentifiers to assess.
Return value
bool Whether all the given resource identifiers are unique.
1 call to ResourceIdentifier::areResourceIdentifiersUnique()
- ResourceIdentifierNormalizer::denormalize in core/
modules/ jsonapi/ src/ Normalizer/ ResourceIdentifierNormalizer.php
File
- core/
modules/ jsonapi/ src/ JsonApiResource/ ResourceIdentifier.php, line 267
Class
- ResourceIdentifier
- Represents a JSON:API resource identifier object.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public static function areResourceIdentifiersUnique(array $resource_identifiers) {
return count($resource_identifiers) === count(static::deduplicate($resource_identifiers));
}