src/services/TaskTypeService.php
protected function composeFields()
    {
        $addFields = [];
        $updateFields = [];

        foreach ($this->entities as $entity) {
            if ($entity->id) {
                $updateFields[] = $entity->get();
            } else {
                $addFields[] = $entity->get();
            }
        }

        $this->fields['ACTION'] = 'ALL_EDIT';

        $fields = array_merge($addFields, $updateFields);

        if (count($fields)) {
            $this->fields['task_types'] = $fields;
        }
    }
protected function composeFields()
    {
        $addFields = [];
        $updateFields = [];

        foreach ($this->entities as $entity) {
            if ($entity->id) {
                $updateFields[] = $entity->get();
            } else {
                $addFields[] = $entity->get();
            }
        }

        $this->fields['ACTION'] = 'ALL_EDIT';

        $fields = array_merge($addFields, $updateFields);

        if (count($fields)) {
            $this->fields['task_types'] = $fields;
        }
    }
protected function composeFields ( ) { $ addFields = [ ] ; $ updateFields = [ ] ; foreach ( $ this -> entities as $ entity ) { if ( $ entity -> id ) { $ updateFields [ ] = $ entity -> get ( ) ; } else { $ addFields [ ] = $ entity -> get ( ) ; } } $ this -> fields [ 'ACTION' ] = 'ALL_EDIT' ; $ fields = array_merge ( $ addFields , $ updateFields ) ; if ( count ( $ fields ) ) { $ this -> fields [ 'task_types' ] = $ fields ; } }
Fill fields for save request
Fill fields for save request