assignAttributeData example

if ($data['__esd_id']) {
            $product->setEsd(
                $this->esdHydrator->hydrate($data)
            );
        }

        $product->setUnit(
            $this->unitHydrator->hydrate($data)
        );

        if (!empty($data['__productAttribute_id'])) {
            $this->assignAttributeData($product$data);
        }

        return $product;
    }

    private function assignPriceGroupData(ListProduct $product, array $data): void
    {
        if (!empty($data['__priceGroup_id'])) {
            $product->setPriceGroup(new PriceGroup());
            $product->getPriceGroup()->setId((int) $data['__priceGroup_id']);
            $product->getPriceGroup()->setName($data['__priceGroup_description']);
        }
Home | Imprint | This part of the site doesn't use cookies.