Load manufacturer list, mark active category;

@param string $sType  active list type
@param string $sValue active list item id

@return oxManufacturerList
506351
public function getManufacturerList($sType, $sValue)
    {
        $oMnfTree = oxNew(\OxidEsales\Eshop\Application\Model\ManufacturerList::class);
        $oMnfTree->loadManufacturerList();
        if ($sType === 'mnf') {
            foreach ($oMnfTree as $oManufacturer) {
                if ($oManufacturer->oxmanufacturers__oxid->value == $sValue) {
                    $oManufacturer->selected = 1;
                    break;
                }
            }
        }

        return $oMnfTree;
    }
1276960
public function _unserializeConfVar($sType, $sName, $sValue)
    {
        $oStr = getStr();
        $mData = null;

        switch ($sType) {
            case "bool":
                $mData = ($sValue == "true" || $sValue == "1");
                break;

            case "str":
            case "select":
            case "num":
            case "int":
                $mData = $oStr->htmlentities($sValue);
                if (in_array($sName, $this->_aParseFloat)) {
                    $mData = str_replace(',', '.', $mData);
                }
                break;

            case "arr":
                if (in_array($sName, $this->_aSkipMultiline)) {
                    $mData = unserialize($sValue);
                } else {
                    $mData = $oStr->htmlentities($this->_arrayToMultiline(unserialize($sValue)));
                }
                break;

            case "aarr":
                if (in_array($sName, $this->_aSkipMultiline)) {
                    $mData = unserialize($sValue);
                } else {
                    $mData = $oStr->htmlentities($this->_aarrayToMultiline(unserialize($sValue)));
                }
                break;
        }

        return $mData;
    }
125209
public function addManufacturer()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        $articleIds = $this->_getActionIds('oxarticles.oxid');
        $manufacturerId = $config->getRequestParameter('synchoxid');

        if ($config->getRequestParameter('all')) {
            $articleViewName = $this->_getViewName('oxarticles');
            $articleIds = $this->_getAll($this->_addFilter("select $articleViewName.oxid " . $this->_getQuery()));
        }

        if ($manufacturerId && $manufacturerId != "-1" && is_array($articleIds)) {
            $database = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();

            $query = $this->formArticleToManufacturerAdditionQuery($manufacturerId, $articleIds);
            $database->execute($query);
            $this->resetCounter("manufacturerArticle", $manufacturerId);
        }
    }
967686
def _jstype(self, stype, sval):
        
        if stype == self.IS_LIST:
            return "array"
        if stype == self.IS_DICT:
            return "object"
        if isinstance(sval, Scalar):
            return sval.jstype
        # it is a Schema, so return type of contents
        v = sval._schema
        return self._jstype(self._whatis(v), v)
321204
@SneakyThrows
    public <T extends SOAPObject> T newSoapObject(final Class<T> objectType) {
        val qName = getSamlObjectQName(objectType);
        val builder = (SOAPObjectBuilder<T>)
            XMLObjectProviderRegistrySupport.getBuilderFactory().getBuilder(qName);
        if (builder == null) {
            throw new IllegalStateException("No SAML object builder is registered for class " + objectType.getName());
        }
        return objectType.cast(builder.buildObject(qName));
    }
879513
public function RenderShippingInfo($sViewName, $sViewType, $aCallTimeVars = array())
    {
        $oView = new TViewParser();
        $oView->AddVar('oShop', $this);
        $oShippingIntroText = $this->GetShopInfo('shipping-intro');
        $oShippingEndText = $this->GetShopInfo('shipping-end');
        $oView->AddVar('oShippingIntroText', $oShippingIntroText);
        $oView->AddVar('oShippingEndText', $oShippingEndText);

        // get the shipping list for users not sigend in
        $oPublicShippingGroups = &TdbShopShippingGroupList::GetPublicShippingGroups();
        $oView->AddVar('oPublicShippingGroups', $oPublicShippingGroups);

        $oView->AddVar('aCallTimeVars', $aCallTimeVars);
        $aOtherParameters = $this->GetAdditionalViewVariables($sViewName, $sViewType);
        $oView->AddVarArray($aOtherParameters);

        return $oView->RenderObjectPackageView($sViewName, self::VIEW_PATH, $sViewType);
    }
1344806
protected function addActiveLangSuffix($sValue, $sSeparator = '_')
    {
        if (empty(self::$sActiveLang)) {
            return $sValue;
        }

        return $sValue.$sSeparator.self::$sActiveLang;
    }
991265
public function loadRDFaDeliverySetList($sDelId = null)
    {
        $sTable = getViewName('oxdeliveryset');
        if ($sDelId) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
            $sSubSql = "( select $sTable.* from $sTable left join oxdel2delset on oxdel2delset.oxdelsetid=$sTable.oxid where " . $this->getBaseObject()->getSqlActiveSnippet() . " and oxdel2delset.oxdelid = " . $oDb->quote($sDelId) . " ) as $sTable";
        } else {
            $sSubSql = $sTable;
        }
        $sQ = "select $sTable.*, oxobject2delivery.oxobjectid from $sSubSql left join (select oxobject2delivery.* from oxobject2delivery where oxobject2delivery.oxtype = 'rdfadeliveryset' ) as oxobject2delivery on oxobject2delivery.oxdeliveryid=$sTable.oxid where " . $this->getBaseObject()->getSqlActiveSnippet() . " ";
        $this->selectString($sQ);
    }
360579
public function Render($sViewName = 'RatingService_standard', $sViewSubType = 'pkgShopRatingService/views', $sViewType = 'Customer', $sSpotName = null, $aCallTimeVars = array())
    {
        $sHTML = '';
        $oView = new TViewParser();
        /** @var $oView TViewParser */

        //create view name for this "active" rating-service
        if (!empty($this->fieldAffiliateValue)) {
            $sViewName = $sViewName.'_'.trim($this->fieldAffiliateValue);
        }

        foreach ($aCallTimeVars as $sKeyName => $sValue) {
            if (!empty($sKeyName)) {
                $oView->AddVar($sKeyName, $sValue);
            }
        }

        $sHTML .= $oView->RenderObjectPackageView($sViewName, $sViewSubType, $sViewType);

        return $sHTML;
    }
363257
public static function factory($xValue = null, $yValue = null)
    {
        $dataPoint = new self();

        $dataPoint
            ->setXValue($xValue)
            ->setYValue($yValue);

        return $dataPoint;
    }
872946
public function ifge($sValue1, $sValue2)
    {
        $this->sCondition = '(' . Parameter::make($sValue1) . '>=' . Parameter::make($sValue2) . ')';
        return $this;
    }
993960
protected function &GetAdditionalViewVariables($sViewName, $sViewType)
    {
        $aViewVariables = &parent::GetAdditionalViewVariables($sViewName, $sViewType);

        $aViewVariables['bShowNewsletterSignup'] = true;
        $aViewVariables['newsletter'] = false;
        $aInput = TGlobal::instance()->GetUserData('aInput');
        if (is_array($aInput) && isset($aInput['newsletter']) && '1' == $aInput['newsletter']) {
            $aViewVariables['newsletter'] = true;
        }

        $oUser = TdbDataExtranetUser::GetInstance();
        // show newsletter signup at all?
        $aCondition = array(
            "`email` = '".MySqlLegacySupport::getInstance()->real_escape_string($oUser->GetUserEMail())."'",
        );

        if ($oUser && $oUser->IsLoggedIn()) {
            $aCondition[] = "`data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($oUser->id)."'";
        }
        $query = "SELECT COUNT(*) AS total FROM `pkg_newsletter_user` WHERE `optin` = '1' AND ((".implode(') OR (', $aCondition).'))';
        if ($aRow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
            if ($aRow['total'] > 0) {
                $aViewVariables['bShowNewsletterSignup'] = false;
            }
        }

        return $aViewVariables;
    }
895029
public function getWrappingList($sWrapType)
    {
        // load wrapping
        $oEntries = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
        $oEntries->init('oxwrapping');
        $sWrappingViewName = getViewName('oxwrapping');
        $sSelect = "select * from $sWrappingViewName where $sWrappingViewName.oxactive = '1' and $sWrappingViewName.oxtype = " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sWrapType);
        $oEntries->selectString($sSelect);

        return $oEntries;
    }
785463
public function getCategoryList($sType, $sValue)
    {
        /** @var \OxidEsales\Eshop\Application\Model\CategoryList $oCatTree parent category tree */
        $oCatTree = oxNew(\OxidEsales\Eshop\Application\Model\CategoryList::class);
        $oCatTree->loadList();
        if ($sType === 'cat') {
            foreach ($oCatTree as $oCategory) {
                if ($oCategory->oxcategories__oxid->value == $sValue) {
                    $oCategory->selected = 1;
                    break;
                }
            }
        }

        return $oCatTree;
    }
1008903
protected function _getManufacturer($oArticle, $iLang)
    {
        $oManufacturer = null;
        if ($sActManufacturerId = $oArticle->oxarticles__oxmanufacturerid->value) {
            $oView = \OxidEsales\Eshop\Core\Registry::getConfig()->getActiveView();

            if ($oView instanceof \OxidEsales\Eshop\Application\Controller\FrontendController && ($oActManufacturer = $oView->getActManufacturer())) {
                $oManufacturer = $oActManufacturer;
            } else {
                $oManufacturer = oxNew(\OxidEsales\Eshop\Application\Model\Manufacturer::class);
            }

            if ($oManufacturer->getId() !== $sActManufacturerId || $oManufacturer->getLanguage() != $iLang) {
                $oManufacturer = oxNew(\OxidEsales\Eshop\Application\Model\Manufacturer::class);
                if (!$oManufacturer->loadInLang($iLang, $sActManufacturerId)) {
                    $oManufacturer = null;
                }
            }
        }

        return $oManufacturer;
    }
1170337
private static function getFactory(int $installType): PlatformPageObjectFactory
    {
        switch ($installType) {
            case InstallType::PLATFORM:
            case InstallType::PLATFORM_DEMO:
                return new PlatformPageObjectFactory();
            case InstallType::ENTERPRISE:
                return new EnterprisePageObjectFactory();
            case InstallType::ENTERPRISE_DEMO:
                return new DemoEnterprisePageObjectFactory();
            default:
                throw new \Exception('Unrecognised install type');
        }
    }
798939
protected function getMenuTypeObject($sType)
    {
        switch ($sType) {
            case CategoryMenuType::MENU_TYPE:
                return new CategoryMenuType();
            case CatalogMenuType::MENU_TYPE:
                return new  CatalogMenuType();
            case AllCategoriesMenuType::MENU_TYPE:
                return new AllCategoriesMenuType();
            default:
                return null;
        }
    }