getTranslatedFields example

$entity->customFields = $definition->decode('customFields', self::value($row$root, 'customFields'));
        }
        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;
    }
}
throw new \RuntimeException(sprintf('Field %s not found', $property));
        }

        return $field->getSerializer()->decode($field$value);
    }

    /** * @return array<string, TranslatedField> */
    public function getTranslatedFields(): array
    {
        return $this->getFields()->getTranslatedFields();
    }

    /** * @return array<string, Field> */
    public function getExtensionFields(): array
    {
        return $this->getFields()->getExtensionFields();
    }

    protected function getParentDefinitionClass(): ?string
    {
$entity->productStreamId = Uuid::fromBytesToHex($row[$root . '.productStreamId']);
        }
        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->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());

        return $entity;
    }
}
if (\array_key_exists($root . '.customFields', $row)) {
            $entity->customFields = $definition->decode('customFields', self::value($row$root, 'customFields'));
        }
        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;
    }
}

        if (isset($row[$root . '.visibleOnProductDetailPage'])) {
            $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;
    }
}

        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);
        $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;
    }
}
$entity->mediaId = Uuid::fromBytesToHex($row[$root . '.mediaId']);
        }
        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 (\array_key_exists($root . '.features', $row)) {
            $entity->features = $definition->decode('features', self::value($row$root, 'features'));
        }
        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());

        return $entity;
    }
}

        if (\array_key_exists($root . '.fields', $row)) {
            $entity->fields = $definition->decode('fields', self::value($row$root, 'fields'));
        }
        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());

        return $entity;
    }
}
$entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }

        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 . '.link'])) {
            $entity->link = $row[$root . '.link'];
        }
        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;
    }
}
if (\array_key_exists($root . '.excludedTerms', $row)) {
            $entity->excludedTerms = $definition->decode('excludedTerms', self::value($row$root, 'excludedTerms'));
        }
        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->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());

        return $entity;
    }
}
$entity->ranking = (float) $row[$root . '.ranking'];
        }
        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->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());

        return $entity;
    }
}
$entity->updatedAt = new \DateTimeImmutable($row[$root . '.updatedAt']);
        }
        $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 . '.languageId'])) {
            $entity->languageId = Uuid::fromBytesToHex($row[$root . '.languageId']);
        }
        if (isset($row[$root . '.keyword'])) {
            $entity->keyword = $row[$root . '.keyword'];
        }
        if (isset($row[$root . '.reversed'])) {
            $entity->reversed = $row[$root . '.reversed'];
        }
        $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());

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