library/Services/ThemeSwitcher/ThemeSwitcher.php
public function init($request)
    {
        $themeName = $request->getParameter('themeName');
        $shopId = $request->getParameter('shp');

        $currentShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        \OxidEsales\Eshop\Core\Registry::getConfig()->setShopId($shopId);

        $theme = oxNew( \OxidEsales\Eshop\Core\Theme::class);
        $theme->load($themeName);
        $theme->activate();

        \OxidEsales\Eshop\Core\Registry::getConfig()->setShopId($currentShopId);
    }
public function init($request)
    {
        $themeName = $request->getParameter('themeName');
        $shopId = $request->getParameter('shp');

        $currentShopId = \OxidEsales\Eshop\Core\Registry::getConfig()->getShopId();
        \OxidEsales\Eshop\Core\Registry::getConfig()->setShopId($shopId);

        $theme = oxNew( \OxidEsales\Eshop\Core\Theme::class);
        $theme->load($themeName);
        $theme->activate();

        \OxidEsales\Eshop\Core\Registry::getConfig()->setShopId($currentShopId);
    }
public function init ( $ request ) { $ themeName = $ request -> getParameter ( 'themeName' ) ; $ shopId = $ request -> getParameter ( 'shp' ) ; $ currentShopId = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getShopId ( ) ; \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> setShopId ( $ shopId ) ; $ theme = oxNew ( \ OxidEsales \ Eshop \ Core \ Theme :: class ) ; $ theme -> load ( $ themeName ) ; $ theme -> activate ( ) ; \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> setShopId ( $ currentShopId ) ; }
Initiates service.

@param \OxidEsales\TestingLibrary\Services\Library\Request $request
Initiates service .