Utility/Fields/Repeater.php
private function initRepeatFields($fieldInfo, $default = null)
    {
        $controls = array();
        $repeaterId = $fieldInfo->id;
        $entity = Entity::getEntity($this->entityId, $this->entityType, $repeaterId);
        $repeaters = Entity::getAllDataTranactionRepeater($this->entityId, $this->entityType, $repeaterId, $this->locale);
        $this->repeaterFieldData = Entity::getAllDataTranactionRepeaterFields($this->entityId, $this->entityType, $repeaterId, $this->locale);
        $post_data = @$default['value'];
        $this->defaultOrder = @$default['order'];
        $repeater_field = $this->field;
        $fieldOfRepeater = $repeater_field->getListFields();
        if (isset($post_data)) {
            unset($post_data['clone']);
            $this->deleteItems = $default['delete'];

            foreach ($post_data as $k => $control) {
                $listDefault = $post_data[$k];
                $controls[$k]['fields'] = $this->createListControlAfterPostData($k, $listDefault, $fieldOfRepeater);
                $controls[$k]['order'] = -1;
            }
        } else {
            if (count($repeaters)) {
                $i = 1;

                foreach ($repeaters as $repeater) {
                    $controls[$repeater->id]['fields'] = $this->createListControl($repeater, $fieldOfRepeater);
                    $controls[$repeater->id]['order'] = $i;
                    ++$i;
                }
            }
        }

        $this->groupFields = $controls;

        $this->repeaterHeaders = $this->createHeaderRepeater($fieldOfRepeater);
    }
private function initRepeatFields($fieldInfo, $default = null)
    {
        $controls = array();
        $repeaterId = $fieldInfo->id;
        $entity = Entity::getEntity($this->entityId, $this->entityType, $repeaterId);
        $repeaters = Entity::getAllDataTranactionRepeater($this->entityId, $this->entityType, $repeaterId, $this->locale);
        $this->repeaterFieldData = Entity::getAllDataTranactionRepeaterFields($this->entityId, $this->entityType, $repeaterId, $this->locale);
        $post_data = @$default['value'];
        $this->defaultOrder = @$default['order'];
        $repeater_field = $this->field;
        $fieldOfRepeater = $repeater_field->getListFields();
        if (isset($post_data)) {
            unset($post_data['clone']);
            $this->deleteItems = $default['delete'];

            foreach ($post_data as $k => $control) {
                $listDefault = $post_data[$k];
                $controls[$k]['fields'] = $this->createListControlAfterPostData($k, $listDefault, $fieldOfRepeater);
                $controls[$k]['order'] = -1;
            }
        } else {
            if (count($repeaters)) {
                $i = 1;

                foreach ($repeaters as $repeater) {
                    $controls[$repeater->id]['fields'] = $this->createListControl($repeater, $fieldOfRepeater);
                    $controls[$repeater->id]['order'] = $i;
                    ++$i;
                }
            }
        }

        $this->groupFields = $controls;

        $this->repeaterHeaders = $this->createHeaderRepeater($fieldOfRepeater);
    }
Set data per group.

@param $fieldInfo
@param null $default