decorateResourceIdentifierWithDrupalInternalTargetId example

$is_multiple = $field->getFieldDefinition()->getFieldStorageDefinition()->getCardinality() !== 1;
    if ($field->isEmpty()) {
      return $is_multiple ? [] : NULL;
    }
    if (!$is_multiple) {
      $target_entity = $field->entity;
      if (is_null($target_entity)) {
        return NULL;
      }

      $resource_identifier = static::toResourceIdentifier($target_entity);
      $resource_identifier = static::decorateResourceIdentifierWithDrupalInternalTargetId($field$resource_identifier);
      return $resource_identifier;
    }
    else {
      $arity_counter = [];
      $relation_list = array_filter(array_map(function D$item) use (&$arity_counter) {
        $target_entity = $item->entity;

        if (is_null($target_entity)) {
          return NULL;
        }

        
Home | Imprint | This part of the site doesn't use cookies.