public function saveRepeaterField()
    {
        $repeaterId = $this->repeaterId;

        $repeaterTranslate = RepeaterTranslation::firstOrNew(array('id' => $this->translationId));

        if (!$repeaterTranslate->id) {
            $entity = Entity::getEntity($this->entityId, $this->entityType, $repeaterId);
            if (!$entity->id) {
                $entity->entity_id = $this->entityId;
                $entity->entity_type = $this->entityType;
                $entity->field_id = $repeaterId;
                $entity->save();
            }
            $repeaterTranslate->entity_repeater_id = $entity->id;
            $repeaterTranslate->locale = $this->locale;
            $repeaterTranslate->save();
        }
        $this->model->translation_id = $repeaterTranslate->id;
        $this->model->field_id = $this->fieldId;

        $this->model->value = $this->getValue();
        $this->model->save();
        // assign translate_id to same group;
        $this->translationId = $this->model->translation_id;
    }
public function saveRepeaterField()
    {
        $repeaterId = $this->repeaterId;

        $repeaterTranslate = RepeaterTranslation::firstOrNew(array('id' => $this->translationId));

        if (!$repeaterTranslate->id) {
            $entity = Entity::getEntity($this->entityId, $this->entityType, $repeaterId);
            if (!$entity->id) {
                $entity->entity_id = $this->entityId;
                $entity->entity_type = $this->entityType;
                $entity->field_id = $repeaterId;
                $entity->save();
            }
            $repeaterTranslate->entity_repeater_id = $entity->id;
            $repeaterTranslate->locale = $this->locale;
            $repeaterTranslate->save();
        }
        $this->model->translation_id = $repeaterTranslate->id;
        $this->model->field_id = $this->fieldId;

        $this->model->value = $this->getValue();
        $this->model->save();
        // assign translate_id to same group;
        $this->translationId = $this->model->translation_id;
    }
public function saveRepeaterField ( ) { $ repeaterId = $ this -> repeaterId ; $ repeaterTranslate = RepeaterTranslation :: firstOrNew ( array ( 'id' => $ this -> translationId ) ) ; if ( ! $ repeaterTranslate -> id ) { $ entity = Entity :: getEntity ( $ this -> entityId , $ this -> entityType , $ repeaterId ) ; if ( ! $ entity -> id ) { $ entity -> entity_id = $ this -> entityId ; $ entity -> entity_type = $ this -> entityType ; $ entity -> field_id = $ repeaterId ; $ entity -> save ( ) ; } $ repeaterTranslate -> entity_repeater_id = $ entity -> id ; $ repeaterTranslate -> locale = $ this -> locale ; $ repeaterTranslate -> save ( ) ; } $ this -> model -> translation_id = $ repeaterTranslate -> id ; $ this -> model -> field_id = $ this -> fieldId ; $ this -> model -> value = $ this -> getValue ( ) ; $ this -> model -> save ( ) ; // assign translate_id to same group; $ this -> translationId = $ this -> model -> translation_id ; }
Save repeat data for field of repeater.
Save repeat data for field of repeater .