You are here

protected static function FieldResolver::isDelta in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::isDelta()
  2. 9 core/modules/jsonapi/src/Context/FieldResolver.php \Drupal\jsonapi\Context\FieldResolver::isDelta()

Determines if a path part targets a specific field delta.

Parameters

string $part: The path part.

Return value

bool TRUE if the part is an integer, FALSE otherwise.

File

core/modules/jsonapi/src/Context/FieldResolver.php, line 666

Class

FieldResolver
A service that evaluates external path expressions against Drupal fields.

Namespace

Drupal\jsonapi\Context

Code

protected static function isDelta($part) {
  return (bool) preg_match('/^[0-9]+$/', $part);
}