public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray)
    {
        if ($table === 'tt_address' && ($status === 'new' || $status === 'update')) {
            if ($this->settings->isStoreBackwardsCompatName()) {
                $address = $status === 'update' ? $this->getRecord($id) : $fieldArray;

                $newRecord = array_merge($address, $fieldArray);

                $combinedName = trim(sprintf(
                    $this->settings->getBackwardsCompatFormat(),
                    $newRecord['first_name'],
                    $newRecord['middle_name'],
                    $newRecord['last_name']
                ));

                if (!empty($combinedName)) {
                    $fieldArray['name'] = $combinedName;
                }
            }
        }
    }
public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray)
    {
        if ($table === 'tt_address' && ($status === 'new' || $status === 'update')) {
            if ($this->settings->isStoreBackwardsCompatName()) {
                $address = $status === 'update' ? $this->getRecord($id) : $fieldArray;

                $newRecord = array_merge($address, $fieldArray);

                $combinedName = trim(sprintf(
                    $this->settings->getBackwardsCompatFormat(),
                    $newRecord['first_name'],
                    $newRecord['middle_name'],
                    $newRecord['last_name']
                ));

                if (!empty($combinedName)) {
                    $fieldArray['name'] = $combinedName;
                }
            }
        }
    }
public function processDatamap_postProcessFieldArray ( $ status , $ table , $ id , & $ fieldArray ) { if ( $ table === 'tt_address' && ( $ status === 'new' || $ status === 'update' ) ) { if ( $ this -> settings -> isStoreBackwardsCompatName ( ) ) { $ address = $ status === 'update' ? $ this -> getRecord ( $ id ) : $ fieldArray ; $ newRecord = array_merge ( $ address , $ fieldArray ) ; $ combinedName = trim ( sprintf ( $ this -> settings -> getBackwardsCompatFormat ( ) , $ newRecord [ 'first_name' ] , $ newRecord [ 'middle_name' ] , $ newRecord [ 'last_name' ] ) ) ; if ( ! empty ( $ combinedName ) ) { $ fieldArray [ 'name' ] = $ combinedName ; } } } }
looks for tt_address records with changes to the first, middle, and
last name fields to come by. This function will then write changes back
to the old combined name field in a configurable format

@param string $status action status: new/update is relevant for us
@param string $table db table
@param int $id record uid
@param array $fieldArray record
looks for tt_address records with changes to the first middle and last name fields to come by . This function will then write changes back to the old combined name field in a configurable format