hydrateSet example

public function hydrateValues(array $data)
    {
        $this->sortGroups($data);

        $sets = [];

        foreach ($data as $row) {
            $setId = $row['__propertySet_id'];
            $groupId = $row['__propertyGroup_id'];
            $optionId = $row['__propertyOption_id'];

            $set = $sets[$setId] ?? $this->hydrateSet($row);

            $groups = $set->getGroups();
            $group = $groups[$groupId] ?? $this->hydrateGroup($row);

            $options = $group->getOptions();
            $options[$optionId] = $this->hydrateOption($row);
            $groups[$groupId] = $group;
            $sets[$setId] = $set;

            $group->setOptions($options);
            $set->setGroups($groups);
        }
Home | Imprint | This part of the site doesn't use cookies.