* @link http://www.oxidmodule.com */ namespace D3\Multilang\Modules\Application\Controller\Admin; use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod; use D3\Multilang\Application\Model\d3_translations; use Doctrine\DBAL\DBALException; use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; use OxidEsales\Eshop\Core\Exception\DatabaseErrorException; use OxidEsales\Eshop\Core\Exception\StandardException; use OxidEsales\Eshop\Core\Registry; use OxidEsales\Eshop\Core\UtilsView; class d3cleartmp_multilang extends d3cleartmp_multilang_parent { protected $_sMultiLangModId = 'd3_multilang'; /** * @return string */ protected function _d3GetMultiLangModId() { return $this->_sMultiLangModId; } /** * @return bool|d3_cfg_mod|false * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function d3GetMultiLangSet() { return d3_cfg_mod::get($this->_d3GetMultiLangModId()); } public function clearTmp() { $blReturn = false; if ($this->d3GetMultiLangSet()->isActive()) { if (!Registry::getRequest()->getRequestEscapedParameter('clearall')) { if (Registry::getRequest()->getRequestEscapedParameter('importmultilang')) { $this->addTplParam('importMultilang', true); /** @var d3_translations $oTranslation */ $oTranslation = oxNew(d3_translations::class); $oTranslation->importInstalled(); } } if ($blReturn) { Registry::get(UtilsView::class)->addErrorToDisplay(new StandardException('D3_CFG_CLRTMP_SUCCESS')); } } parent::clearTmp(); } }