source/Application/Controller/Admin/SelectListMain.php
public function changeField()
    {
        $sAddField = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddField");
        if (empty($sAddField)) {
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("iErrorCode", ERR_REQUIREDMISSING);

            return;
        }

        $aChangeFields = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aFields");
        if (is_array($aChangeFields) && count($aChangeFields)) {
            $oSelectlist = oxNew(\OxidEsales\Eshop\Application\Model\SelectList::class);
            if ($oSelectlist->loadInLang($this->_iEditLang, $this->getEditObjectId())) {
                $this->aFieldArray = \OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($oSelectlist->oxselectlist__oxvaldesc->getRawValue());
                $sChangeFieldName = $this->parseFieldName($aChangeFields[0]);

                foreach ($this->aFieldArray as $sKey => $oField) {
                    if ($oField->name == $sChangeFieldName) {
                        $this->aFieldArray[$sKey]->name = $sAddField;
                        $this->aFieldArray[$sKey]->price = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddFieldPriceMod");
                        $this->aFieldArray[$sKey]->priceUnit = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddFieldPriceModUnit");
                        if ($iPos = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddFieldPos")) {
                            if ($this->_rearrangeFields($this->aFieldArray[$sKey], $iPos - 1)) {
                                return;
                            }
                        }
                        break;
                    }
                }
                $this->save();
            }
        }
    }
public function changeField()
    {
        $sAddField = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddField");
        if (empty($sAddField)) {
            \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("iErrorCode", ERR_REQUIREDMISSING);

            return;
        }

        $aChangeFields = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("aFields");
        if (is_array($aChangeFields) && count($aChangeFields)) {
            $oSelectlist = oxNew(\OxidEsales\Eshop\Application\Model\SelectList::class);
            if ($oSelectlist->loadInLang($this->_iEditLang, $this->getEditObjectId())) {
                $this->aFieldArray = \OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($oSelectlist->oxselectlist__oxvaldesc->getRawValue());
                $sChangeFieldName = $this->parseFieldName($aChangeFields[0]);

                foreach ($this->aFieldArray as $sKey => $oField) {
                    if ($oField->name == $sChangeFieldName) {
                        $this->aFieldArray[$sKey]->name = $sAddField;
                        $this->aFieldArray[$sKey]->price = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddFieldPriceMod");
                        $this->aFieldArray[$sKey]->priceUnit = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddFieldPriceModUnit");
                        if ($iPos = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("sAddFieldPos")) {
                            if ($this->_rearrangeFields($this->aFieldArray[$sKey], $iPos - 1)) {
                                return;
                            }
                        }
                        break;
                    }
                }
                $this->save();
            }
        }
    }
public function changeField ( ) { $ sAddField = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "sAddField" ) ; if ( empty ( $ sAddField ) ) { \ OxidEsales \ Eshop \ Core \ Registry :: getSession ( ) -> setVariable ( "iErrorCode" , ERR_REQUIREDMISSING ) ; return ; } $ aChangeFields = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "aFields" ) ; if ( is_array ( $ aChangeFields ) && count ( $ aChangeFields ) ) { $ oSelectlist = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ SelectList :: class ) ; if ( $ oSelectlist -> loadInLang ( $ this -> _iEditLang , $ this -> getEditObjectId ( ) ) ) { $ this -> aFieldArray = \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> assignValuesFromText ( $ oSelectlist -> oxselectlist__oxvaldesc -> getRawValue ( ) ) ; $ sChangeFieldName = $ this -> parseFieldName ( $ aChangeFields [ 0 ] ) ; foreach ( $ this -> aFieldArray as $ sKey => $ oField ) { if ( $ oField -> name == $ sChangeFieldName ) { $ this -> aFieldArray [ $ sKey ] -> name = $ sAddField ; $ this -> aFieldArray [ $ sKey ] -> price = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "sAddFieldPriceMod" ) ; $ this -> aFieldArray [ $ sKey ] -> priceUnit = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "sAddFieldPriceModUnit" ) ; if ( $ iPos = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "sAddFieldPos" ) ) { if ( $ this -> _rearrangeFields ( $ this -> aFieldArray [ $ sKey ] , $ iPos - 1 ) ) { return ; } } break ; } } $ this -> save ( ) ; } } }
Modifies field from field array's first elem. and stores object

@return null
Modifies field from field array s first elem . and stores object