source/Core/Email.php
protected function _getShop($langId = null, $shopId = null)
    {
        if ($langId === null && $shopId === null) {
            if (isset($this->_oShop)) {
                return $this->_oShop;
            } else {
                return $this->_oShop = Registry::getConfig()->getActiveShop();
            }
        }

        $myConfig = Registry::getConfig();

        $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
        if ($shopId !== null) {
            $shop->setShopId($shopId);
        }
        if ($langId !== null) {
            $shop->setLanguage($langId);
        }
        $shop->load($myConfig->getShopId());

        return $shop;
    }
protected function _getShop($langId = null, $shopId = null)
    {
        if ($langId === null && $shopId === null) {
            if (isset($this->_oShop)) {
                return $this->_oShop;
            } else {
                return $this->_oShop = Registry::getConfig()->getActiveShop();
            }
        }

        $myConfig = Registry::getConfig();

        $shop = oxNew(\OxidEsales\Eshop\Application\Model\Shop::class);
        if ($shopId !== null) {
            $shop->setShopId($shopId);
        }
        if ($langId !== null) {
            $shop->setLanguage($langId);
        }
        $shop->load($myConfig->getShopId());

        return $shop;
    }
protected function _getShop ( $ langId = null , $ shopId = null ) { if ( $ langId === null && $ shopId === null ) { if ( isset ( $ this -> _oShop ) ) { return $ this -> _oShop ; } else { return $ this -> _oShop = Registry :: getConfig ( ) -> getActiveShop ( ) ; } } $ myConfig = Registry :: getConfig ( ) ; $ shop = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ Shop :: class ) ; if ( $ shopId !== null ) { $ shop -> setShopId ( $ shopId ) ; } if ( $ langId !== null ) { $ shop -> setLanguage ( $ langId ) ; } $ shop -> load ( $ myConfig -> getShopId ( ) ) ; return $ shop ; }
Get active shop and set global params for it
If is set language parameter, load shop in given language

@param int $langId language id
@param int $shopId shop id

@return \OxidEsales\Eshop\Application\Model\Shop
Get active shop and set global params for it If is set language parameter load shop in given language