public function processFieldsBeforeSave(array $newFieldData)
    {
        $trackEngine = $this->getTrackEngine();

        if (! $trackEngine) {
            return $newFieldData;
        }

        $step1Data = $this->_mergeFieldValues($newFieldData, $this->getFieldData(), $trackEngine);
        $step2Data = $trackEngine->getFieldsDefinition()->processBeforeSave($step1Data, $this->_respTrackData);
        $step3Data = $this->handleBeforeFieldUpdate($this->_mergeFieldValues($step2Data, $step1Data, $trackEngine));

        if ($step3Data) {
            return $this->_mergeFieldValues($step3Data, $step2Data, $trackEngine);
        } else {
            return $step2Data;
        }
    }
public function processFieldsBeforeSave(array $newFieldData)
    {
        $trackEngine = $this->getTrackEngine();

        if (! $trackEngine) {
            return $newFieldData;
        }

        $step1Data = $this->_mergeFieldValues($newFieldData, $this->getFieldData(), $trackEngine);
        $step2Data = $trackEngine->getFieldsDefinition()->processBeforeSave($step1Data, $this->_respTrackData);
        $step3Data = $this->handleBeforeFieldUpdate($this->_mergeFieldValues($step2Data, $step1Data, $trackEngine));

        if ($step3Data) {
            return $this->_mergeFieldValues($step3Data, $step2Data, $trackEngine);
        } else {
            return $step2Data;
        }
    }
public function processFieldsBeforeSave ( array $ newFieldData ) { $ trackEngine = $ this -> getTrackEngine ( ) ; if ( ! $ trackEngine ) { return $ newFieldData ; } $ step1Data = $ this -> _mergeFieldValues ( $ newFieldData , $ this -> getFieldData ( ) , $ trackEngine ) ; $ step2Data = $ trackEngine -> getFieldsDefinition ( ) -> processBeforeSave ( $ step1Data , $ this -> _respTrackData ) ; $ step3Data = $ this -> handleBeforeFieldUpdate ( $ this -> _mergeFieldValues ( $ step2Data , $ step1Data , $ trackEngine ) ) ; if ( $ step3Data ) { return $ this -> _mergeFieldValues ( $ step3Data , $ step2Data , $ trackEngine ) ; } else { return $ step2Data ; } }
Processes the field values and and changes them as required

@param array $newFieldData The new field values, may be partial, field set by code overwrite field set by key
@return array The processed data in the format key1 => val1, code1 => val1, key2 => val2
Processes the field values and and changes them as required