hydratePriceDiscount example

public function hydratePriceGroup($data)
    {
        $group = new PriceGroup();

        $first = $data[0];

        $group->setId((int) $first['__priceGroup_id']);
        $group->setName($first['__priceGroup_description']);

        $discounts = [];
        foreach ($data as $row) {
            $discounts[] = $this->hydratePriceDiscount($row);
        }

        $group->setDiscounts($discounts);

        return $group;
    }

    /** * @return PriceDiscount */
    public function hydratePriceDiscount(array $data)
    {
Home | Imprint | This part of the site doesn't use cookies.