getFieldItemDefinitions example

$field_name = $this->getInternalName($part$resource_types);

      // If none of the resource types are traversable, assume that the       // remaining path parts are targeting field deltas and/or field       // properties.       if (!$this->resourceTypesAreTraversable($resource_types)) {
        $reference_breadcrumbs[] = $field_name;
        return $this->constructInternalPath($reference_breadcrumbs$parts);
      }

      // Different resource types have different field definitions.       $candidate_definitions = $this->getFieldItemDefinitions($resource_types$field_name);
      assert(!empty($candidate_definitions));

      // We have a valid field, so add it to the validated trail of path parts.       $reference_breadcrumbs[] = $field_name;

      // Remove resource types which do not have a candidate definition.       $resource_types = array_filter($resource_typesfunction DResourceType $resource_type) use ($candidate_definitions) {
        return isset($candidate_definitions[$resource_type->getTypeName()]);
      });

      // Check access to execute a query for each field per resource type since
Home | Imprint | This part of the site doesn't use cookies.