public static function ResourceIdentifier::isParallel in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::isParallel()
- 9 core/modules/jsonapi/src/JsonApiResource/ResourceIdentifier.php \Drupal\jsonapi\JsonApiResource\ResourceIdentifier::isParallel()
Determines if two ResourceIdentifiers identify the same resource object.
This method does not consider arity.
Parameters
\Drupal\jsonapi\JsonApiResource\ResourceIdentifier $a: The first ResourceIdentifier object.
\Drupal\jsonapi\JsonApiResource\ResourceIdentifier $b: The second ResourceIdentifier object.
Return value
bool TRUE if both relationships reference the same resource, even when they have differing arity values, FALSE otherwise.
File
- core/
modules/ jsonapi/ src/ JsonApiResource/ ResourceIdentifier.php, line 208
Class
- ResourceIdentifier
- Represents a JSON:API resource identifier object.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public static function isParallel(ResourceIdentifier $a, ResourceIdentifier $b) {
return static::compare($a
->withArity(0), $b
->withArity(0)) === 0;
}