source/Application/Controller/Admin/OrderAddress.php
protected function _processAddress($aData, $sTypeToProcess, $aIgnore)
    {
        // empty address fields?
        $blEmpty = true;

        // here we will store names of fields which needs to be cleaned up
        $aFields = [];

        foreach ($aData as $sName => $sValue) {
            // if field type matches..
            if (strpos($sName, $sTypeToProcess) !== false) {
                // storing which fields must be unset..
                $aFields[] = $sName;

                // ignoring whats need to be ignored and testing values
                if (!in_array($sName, $aIgnore) && $sValue) {
                    // something was found - means leaving as is..
                    $blEmpty = false;
                    break;
                }
            }
        }

        // cleanup if empty
        if ($blEmpty) {
            foreach ($aFields as $sName) {
                $aData[$sName] = "";
            }
        }

        return $aData;
    }
protected function _processAddress($aData, $sTypeToProcess, $aIgnore)
    {
        // empty address fields?
        $blEmpty = true;

        // here we will store names of fields which needs to be cleaned up
        $aFields = [];

        foreach ($aData as $sName => $sValue) {
            // if field type matches..
            if (strpos($sName, $sTypeToProcess) !== false) {
                // storing which fields must be unset..
                $aFields[] = $sName;

                // ignoring whats need to be ignored and testing values
                if (!in_array($sName, $aIgnore) && $sValue) {
                    // something was found - means leaving as is..
                    $blEmpty = false;
                    break;
                }
            }
        }

        // cleanup if empty
        if ($blEmpty) {
            foreach ($aFields as $sName) {
                $aData[$sName] = "";
            }
        }

        return $aData;
    }
protected function _processAddress ( $ aData , $ sTypeToProcess , $ aIgnore ) { // empty address fields? $ blEmpty = true ; // here we will store names of fields which needs to be cleaned up $ aFields = [ ] ; foreach ( $ aData as $ sName => $ sValue ) { // if field type matches.. if ( strpos ( $ sName , $ sTypeToProcess ) !== false ) { // storing which fields must be unset.. $ aFields [ ] = $ sName ; // ignoring whats need to be ignored and testing values if ( ! in_array ( $ sName , $ aIgnore ) && $ sValue ) { // something was found - means leaving as is.. $ blEmpty = false ; break ; } } } // cleanup if empty if ( $ blEmpty ) { foreach ( $ aFields as $ sName ) { $ aData [ $ sName ] = "" ; } } return $ aData ; }
Iterates through data array, checks if specified fields are filled
in, cleanups not needed data

@param array  $aData          data to process
@param string $sTypeToProcess data type to process e.g. "oxorder__oxdel"
@param array  $aIgnore        fields which must be ignored while processing

@return null
Iterates through data array checks if specified fields are filled in cleanups not needed data