customFields example


        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->product = $this->manyToOne($row$root$definition->getField('product')$context);
        $entity->customer = $this->manyToOne($row$root$definition->getField('customer')$context);
        $entity->salesChannel = $this->manyToOne($row$root$definition->getField('salesChannel')$context);
        $entity->language = $this->manyToOne($row$root$definition->getField('language')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
$entity->visibleOnProductDetailPage = (bool) $row[$root . '.visibleOnProductDetailPage'];
        }
        if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
continue;
            }

            $value = $row[$key];

            $typed = $field;
            if ($field instanceof TranslatedField) {
                $typed = EntityDefinitionQueryHelper::getTranslatedField($definition$field);
            }

            if ($typed instanceof CustomFields) {
                $this->customFields($definition$row$root$entity$field$context);

                continue;
            }

            if ($field instanceof TranslatedField) {
                // contains the resolved translation chain value                 $decoded = $typed->getSerializer()->decode($typed$value);
                $entity->addTranslated($property$decoded);

                $inherited = $definition->isInheritanceAware() && $context->considerInheritance();
                $chain = EntityDefinitionQueryHelper::buildTranslationChain($root$context$inherited);

                
$entity->deliveryTime = $this->manyToOne($row$root$definition->getField('deliveryTime')$context);
        $entity->tax = $this->manyToOne($row$root$definition->getField('tax')$context);
        $entity->manufacturer = $this->manyToOne($row$root$definition->getField('manufacturer')$context);
        $entity->unit = $this->manyToOne($row$root$definition->getField('unit')$context);
        $entity->cover = $this->manyToOne($row$root$definition->getField('cover')$context);
        $entity->featureSet = $this->manyToOne($row$root$definition->getField('featureSet')$context);
        $entity->cmsPage = $this->manyToOne($row$root$definition->getField('cmsPage')$context);
        $entity->canonicalProduct = $this->manyToOne($row$root$definition->getField('canonicalProduct')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);
        $this->manyToMany($row$root$entity$definition->getField('options'));
        $this->manyToMany($row$root$entity$definition->getField('properties'));
        $this->manyToMany($row$root$entity$definition->getField('categories'));
        $this->manyToMany($row$root$entity$definition->getField('streams'));
        $this->manyToMany($row$root$entity$definition->getField('categoriesRo'));
        $this->manyToMany($row$root$entity$definition->getField('tags'));
        $this->manyToMany($row$root$entity$definition->getField('customFieldSets'));

        return $entity;
    }
}
if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->product = $this->manyToOne($row$root$definition->getField('product')$context);
        $entity->media = $this->manyToOne($row$root$definition->getField('media')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->product = $this->manyToOne($row$root$definition->getField('product')$context);
        $entity->rule = $this->manyToOne($row$root$definition->getField('rule')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
$entity->invalid = (bool) $row[$root . '.invalid'];
        }
        if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->media = $this->manyToOne($row$root$definition->getField('media')$context);
        $entity->group = $this->manyToOne($row$root$definition->getField('group')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);
        $this->manyToMany($row$root$entity$definition->getField('productProperties'));
        $this->manyToMany($row$root$entity$definition->getField('productOptions'));

        return $entity;
    }
}

        if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->media = $this->manyToOne($row$root$definition->getField('media')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
$entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->product = $this->manyToOne($row$root$definition->getField('product')$context);
        $entity->media = $this->manyToOne($row$root$definition->getField('media')$context);
        $entity->option = $this->manyToOne($row$root$definition->getField('option')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
if (isset($row[$root . '.customEntityTypeId'])) {
            $entity->customEntityTypeId = Uuid::fromBytesToHex($row[$root . '.customEntityTypeId']);
        }

        $entity->media = $this->manyToOne($row$root$definition->getField('media')$context);
        $entity->cmsPage = $this->manyToOne($row$root$definition->getField('cmsPage')$context);
        $entity->productStream = $this->manyToOne($row$root$definition->getField('productStream')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);
        $this->manyToMany($row$root$entity$definition->getField('products'));
        $this->manyToMany($row$root$entity$definition->getField('nestedProducts'));
        $this->manyToMany($row$root$entity$definition->getField('tags'));

        return $entity;
    }
}

        if (isset($row[$root . '.createdAt'])) {
            $entity->createdAt = new \DateTimeImmutable($row[$root . '.createdAt']);
        }
        if (isset($row[$root . '.updatedAt'])) {
            $entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $entity->productStream = $this->manyToOne($row$root$definition->getField('productStream')$context);

        $this->translate($definition$entity$row$root$context$definition->getTranslatedFields());
        $this->hydrateFields($definition$entity$root$row$context$definition->getExtensionFields());
        $this->customFields($definition$row$root$entity$definition->getField('customFields')$context);

        return $entity;
    }
}
Home | Imprint | This part of the site doesn't use cookies.