source/Application/Controller/Admin/NewsText.php
public function save()
    {
        parent::save();
        $soxId = $this->getEditObjectId();
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $oNews = oxNew(\OxidEsales\Eshop\Application\Model\News::class);

        $iNewsLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("newslang");

        if (!isset($iNewsLang)) {
            $iNewsLang = $this->_iEditLang;
        }

        if ($soxId != "-1") {
            $oNews->loadInLang($iNewsLang, $soxId);
        } else {
            $aParams['oxnews__oxid'] = null;
        }

        // Disable editing for derived items.
        if ($oNews->isDerived()) {
            return;
        }

        $oNews->setLanguage(0);
        $oNews->assign($aParams);
        $oNews->setLanguage($iNewsLang);

        $oNews->save();
        // set oxid if inserted
        $this->setEditObjectId($oNews->getId());
    }
public function save()
    {
        parent::save();
        $soxId = $this->getEditObjectId();
        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("editval");

        $oNews = oxNew(\OxidEsales\Eshop\Application\Model\News::class);

        $iNewsLang = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("newslang");

        if (!isset($iNewsLang)) {
            $iNewsLang = $this->_iEditLang;
        }

        if ($soxId != "-1") {
            $oNews->loadInLang($iNewsLang, $soxId);
        } else {
            $aParams['oxnews__oxid'] = null;
        }

        // Disable editing for derived items.
        if ($oNews->isDerived()) {
            return;
        }

        $oNews->setLanguage(0);
        $oNews->assign($aParams);
        $oNews->setLanguage($iNewsLang);

        $oNews->save();
        // set oxid if inserted
        $this->setEditObjectId($oNews->getId());
    }
public function save ( ) { parent :: save ( ) ; $ soxId = $ this -> getEditObjectId ( ) ; $ aParams = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "editval" ) ; $ oNews = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ News :: class ) ; $ iNewsLang = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( "newslang" ) ; if ( ! isset ( $ iNewsLang ) ) { $ iNewsLang = $ this -> _iEditLang ; } if ( $ soxId != "-1" ) { $ oNews -> loadInLang ( $ iNewsLang , $ soxId ) ; } else { $ aParams [ 'oxnews__oxid' ] = null ; } // Disable editing for derived items. if ( $ oNews -> isDerived ( ) ) { return ; } $ oNews -> setLanguage ( 0 ) ; $ oNews -> assign ( $ aParams ) ; $ oNews -> setLanguage ( $ iNewsLang ) ; $ oNews -> save ( ) ; // set oxid if inserted $ this -> setEditObjectId ( $ oNews -> getId ( ) ) ; }
Saves news text.

@return mixed
Saves news text .