protected function _saveValidatedBunches()
    {
        $source = $this->getSource();
        $source->rewind();
        while ($source->valid()) {
            try {
                $rowData = $source->current();
            } catch (\InvalidArgumentException $e) {
                $this->addRowError($e->getMessage(), $this->_processedRowsCount);
                $this->_processedRowsCount++;
                $source->next();
                continue;
            }

            $rowData = $this->customFieldsMapping($rowData);

            $this->validateRow($rowData, $source->key());
            $source->next();
        }

        return parent::_saveValidatedBunches();
    }
protected function _saveValidatedBunches()
    {
        $source = $this->getSource();
        $source->rewind();
        while ($source->valid()) {
            try {
                $rowData = $source->current();
            } catch (\InvalidArgumentException $e) {
                $this->addRowError($e->getMessage(), $this->_processedRowsCount);
                $this->_processedRowsCount++;
                $source->next();
                continue;
            }

            $rowData = $this->customFieldsMapping($rowData);

            $this->validateRow($rowData, $source->key());
            $source->next();
        }

        return parent::_saveValidatedBunches();
    }
protected function _saveValidatedBunches ( ) { $ source = $ this -> getSource ( ) ; $ source -> rewind ( ) ; while ( $ source -> valid ( ) ) { try { $ rowData = $ source -> current ( ) ; } catch ( \ InvalidArgumentException $ e ) { $ this -> addRowError ( $ e -> getMessage ( ) , $ this -> _processedRowsCount ) ; $ this -> _processedRowsCount ++ ; $ source -> next ( ) ; continue ; } $ rowData = $ this -> customFieldsMapping ( $ rowData ) ; $ this -> validateRow ( $ rowData , $ source -> key ( ) ) ; $ source -> next ( ) ; } return parent :: _saveValidatedBunches ( ) ; }
Validate data rows and save bunches to DB

@return $this
Validate data rows and save bunches to DB