Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ResourceIdentifier.php

function 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
Denormalizes data back into an object of the given class.

File

core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php, line 267

Class

ResourceIdentifier
Represents a JSON:API resource identifier object.

Namespace

Drupal\jsonapi\JsonApiResource

Code

public static function areResourceIdentifiersUnique(array $resource_identifiers) {
    return count($resource_identifiers) === count(static::deduplicate($resource_identifiers));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal