loads the affected basket articles into $this->oAffectedBasketArticles
also returns list. will only load the articles if $this->oAffectedBasketArticles is null.

@return TShopBasketArticleList
485320
public function &GetAffectedBasketArticles()
    {
        if (is_null($this->oAffectedBasketArticles)) {
            $this->oAffectedBasketArticles = null;
            $oBasket = TShopBasket::GetInstance();
            $this->oAffectedBasketArticles = &$oBasket->GetArticlesAffectedByShippingType($this);
        }

        return $this->oAffectedBasketArticles;
    }
494453
public function getCompArtList()
    {
        if ($this->_oArtList === null) {
            if (($aItems = $this->getCompareItems())) {
                // counts how many pages
                $oList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                $oList->loadIds(array_keys($aItems));

                // cut page articles
                if ($this->_iArticlesPerPage > 0) {
                    $this->_iCntPages = ceil($oList->count() / $this->_iArticlesPerPage);
                    $aItems = $this->_removeArticlesFromPage($aItems, $oList);
                }

                $this->_oArtList = $this->_changeArtListOrder($aItems, $oList);
            }
        }

        return $this->_oArtList;
    }
180186
public function getList()
    {
        if (!userHasPermission('admin:cdn:manager:object:browse')) {
            throw new ApiException(
                'You do not have permission to access this resource',
                $oHttpCodes::STATUS_UNAUTHORIZED
            );
        }

        $oInput       = Factory::service('Input');
        $oObjectModel = Factory::model('Object', 'nails/module-cdn');
        $iBucketId    = (int) $oInput->get('bucket_id') ?: null;
        $iPage        = (int) $oInput->get('page') ?: 1;

        if (empty($iBucketId)) {
            throw new ApiException(
                '`bucket_id` is a required field',
                $oHttpCodes::STATUS_BAD_REQUEST
            );
        }

        $aObjects = $oObjectModel->getAll(
            $iPage,
            static::CONFIG_OBJECTS_PER_PAGE,
            ['where' => [['bucket_id', $iBucketId]]]
        );

        return Factory::factory('ApiResponse', 'nails/module-api')
            ->setData(array_map(
                function ($oObj) {
                    $oObj->url->preview = $oObj->is_img ? cdnCrop($oObj->id, 400, 400) : null;
                    return $oObj;
                },
                $aObjects
            ))
            ->setMeta([
                'page'     => $iPage,
                'per_page' => static::CONFIG_OBJECTS_PER_PAGE,
            ]);
    }
1144478
public function getAccessoires()
    {
        if ($this->_oAccessoires === null) {
            $this->_oAccessoires = false;
            if ($article = $this->getProduct()) {
                $this->_oAccessoires = $article->getAccessoires();
            }
        }

        return $this->_oAccessoires;
    }
179807
public function loadNewestArticles()
    {
        if (($this->_aChannel = $this->_loadFromCache(self::RSS_NEWARTS))) {
            return;
        }
        $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
        $oArtList->loadNewestArticles(\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iRssItemsCount'));

        $oLang = Registry::getLang();
        $this->_loadData(
            self::RSS_NEWARTS,
            $this->getNewestArticlesTitle(),
            $oLang->translateString('NEWEST_SHOP_PRODUCTS', $oLang->getBaseLanguage()),
            $this->_getArticleItems($oArtList),
            $this->getNewestArticlesUrl()
        );
    }
963931
public function getArticleList()
    {
        if ($this->_aArticleList === null) {
            $this->_aArticleList = [];
            if (($oVendor = $this->getActVendor()) && ($oVendor->getId() != 'root')) {
                list($aArticleList, $iAllArtCnt) = $this->_loadArticles($oVendor);
                if ($iAllArtCnt) {
                    $this->_aArticleList = $aArticleList;
                }
            }
        }

        return $this->_aArticleList;
    }
518804
protected function _addBundles()
    {
        $aBundles = [];
        // iterating through articles and binding bundles
        foreach ($this->_aBasketContents as $key => $oBasketItem) {
            try {
                // adding discount type bundles
                if (!$oBasketItem->isDiscountArticle() && !$oBasketItem->isBundle()) {
                    $aBundles = $this->_getItemBundles($oBasketItem, $aBundles);
                } else {
                    continue;
                }

                // adding item type bundles
                $aArtBundles = $this->_getArticleBundles($oBasketItem);
                // adding bundles to basket
                $this->_addBundlesToBasket($aArtBundles);
            } catch (\OxidEsales\Eshop\Core\Exception\NoArticleException $oEx) {
                $this->removeItem($key);
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
            } catch (\OxidEsales\Eshop\Core\Exception\ArticleInputException $oEx) {
                $this->removeItem($key);
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($oEx);
            }
        }

        // adding global basket bundles
        $aBundles = $this->_getBasketBundles($aBundles);

        // adding all bundles to basket
        if ($aBundles) {
            $this->_addBundlesToBasket($aBundles);
        }
    }
779213
public function LoadFromBasket(TShopBasket &$oBasket)
    {
        $oShop = TdbShop::GetInstance();
        $oPortal = $this->getPortalDomainService()->getActivePortal();
        $oUser = TdbDataExtranetUser::GetInstance();
        $oBillingAdr = $oUser->GetBillingAddress();

        $sAffiliateCode = $oShop->GetAffilateCode();
        if (false === $sAffiliateCode) {
            $sAffiliateCode = '';
        }

        $pkg_shop_affiliate_id = '';
        $oAffiliatePartnerProgram = TdbPkgShopAffiliate::GetActiveInstance();
        if ($oAffiliatePartnerProgram) {
            if (!empty($oAffiliatePartnerProgram->sCode)) {
                $pkg_shop_affiliate_id = $oAffiliatePartnerProgram->id;
            }
        }
        $request = $this->getCurrentRequest();
        $aOrderData = array(
            'shop_id' => $oShop->id,
            'cms_portal_id' => $oPortal->id,
            'ordernumber' => '',
            'order_ident' => $oBasket->sBasketIdentifier,
            'data_extranet_user_id' => $oUser->id,
            'user_email' => $oUser->GetUserEMail(),
            'customer_number' => $oUser->GetCustomerNumber(),
            'vat_id' => $oUser->fieldVatId,
            'adr_billing_company' => $oBillingAdr->fieldCompany,
            'adr_billing_salutation_id' => $oBillingAdr->fieldDataExtranetSalutationId,
            'adr_billing_firstname' => $oBillingAdr->fieldFirstname,
            'adr_billing_lastname' => $oBillingAdr->fieldLastname,
            'adr_billing_street' => $oBillingAdr->fieldStreet,
            'adr_billing_streetnr' => $oBillingAdr->fieldStreetnr,
            'adr_billing_city' => $oBillingAdr->fieldCity,
            'adr_billing_postalcode' => $oBillingAdr->fieldPostalcode,
            'adr_billing_country_id' => $oBillingAdr->fieldDataCountryId,
            'adr_billing_telefon' => $oBillingAdr->fieldTelefon,
            'adr_billing_fax' => $oBillingAdr->fieldFax,
            'adr_shipping_use_billing' => '1',
            'adr_shipping_salutation_id' => '',
            'adr_shipping_company' => '',
            'adr_shipping_firstname' => '',
            'adr_shipping_lastname' => '',
            'adr_shipping_street' => '',
            'adr_shipping_streetnr' => '',
            'adr_shipping_city' => '',
            'adr_shipping_postalcode' => '',
            'adr_shipping_country_id' => '',
            'adr_shipping_telefon' => '',
            'adr_shipping_fax' => '',
            'shop_shipping_group_price' => $oBasket->dCostShipping,
            'shop_payment_method_price' => $oBasket->dCostPaymentMethodSurcharge,
            'value_article' => $oBasket->dCostArticlesTotal,
            'value_total' => $oBasket->dCostTotal,
            'value_wrapping' => $oBasket->dCostWrapping,
            'value_wrapping_card' => $oBasket->dCostWrappingCards,
            'value_vouchers' => $oBasket->dCostVouchers,
            'value_vouchers_not_sponsored' => $oBasket->dCostNoneSponsoredVouchers,
            'value_discounts' => $oBasket->dCostDiscounts,
            'value_vat_total' => $oBasket->dCostVAT,
            'count_articles' => $oBasket->dTotalNumberOfArticles,
            'count_unique_articles' => $oBasket->iTotalNumberOfUniqueArticles,
            'totalweight' => $oBasket->dTotalWeight,
            'totalvolume' => $oBasket->dTotalVolume,
            'affiliate_code' => $sAffiliateCode,
            'pkg_shop_affiliate_id' => $pkg_shop_affiliate_id,
            'cms_language_id' => self::getLanguageService()->getActiveLanguageId(),
            'user_ip' => null === $request ? '' : $request->getClientIp(),
        );
        if (property_exists($oBillingAdr, 'fieldAddressAdditionalInfo')) {
            $aOrderData['adr_billing_additional_info'] = $oBillingAdr->fieldAddressAdditionalInfo;
        }

        $oShippingGroup = $oBasket->GetActiveShippingGroup();
        if ($oShippingGroup) {
            $oShippingVat = $oShippingGroup->GetVat();
            $aOrderData['shop_shipping_group_id'] = $oShippingGroup->id;
            $aOrderData['shop_shipping_group_name'] = $oShippingGroup->fieldName;
            if ($oShippingVat) {
                $aOrderData['shop_shipping_group_vat_percent'] = $oShippingVat->fieldVatPercent;
            }
        }
        $oPayment = $oBasket->GetActivePaymentMethod();
        if ($oPayment) {
            $aOrderData['shop_payment_method_id'] = $oPayment->id;
            $aOrderData['shop_payment_method_name'] = $oPayment->fieldName;
            $oPaymentVat = $oPayment->GetVat();
            if ($oPaymentVat) {
                $aOrderData['shop_payment_method_vat_percent'] = $oPaymentVat->fieldVatPercent;
            }
        }

        if (!$oUser->ShipToBillingAddress()) {
            $oShippingAdr = $oUser->GetShippingAddress();
            $aOrderData['adr_shipping_use_billing'] = '0';
            $aOrderData['adr_shipping_salutation_id'] = $oShippingAdr->fieldDataExtranetSalutationId;
            $aOrderData['adr_shipping_company'] = $oShippingAdr->fieldCompany;
            $aOrderData['adr_shipping_firstname'] = $oShippingAdr->fieldFirstname;
            $aOrderData['adr_shipping_lastname'] = $oShippingAdr->fieldLastname;
            $aOrderData['adr_shipping_street'] = $oShippingAdr->fieldStreet;
            $aOrderData['adr_shipping_streetnr'] = $oShippingAdr->fieldStreetnr;
            $aOrderData['adr_shipping_city'] = $oShippingAdr->fieldCity;
            $aOrderData['adr_shipping_postalcode'] = $oShippingAdr->fieldPostalcode;
            $aOrderData['adr_shipping_country_id'] = $oShippingAdr->fieldDataCountryId;
            $aOrderData['adr_shipping_telefon'] = $oShippingAdr->fieldTelefon;
            $aOrderData['adr_shipping_fax'] = $oShippingAdr->fieldFax;
            if (property_exists($oShippingAdr, 'fieldAddressAdditionalInfo')) {
                $aOrderData['adr_shipping_additional_info'] = $oShippingAdr->fieldAddressAdditionalInfo;
            }
        }
        $this->LoadFromBasketPostProcessData($oBasket, $aOrderData);
        $this->LoadFromRow($aOrderData);
    }
312056
public function loadAssocList()
    {
        if ($this->stmt === null) {
            return null;
        }

        $assocList = array();
        while ($row = $this->stmt->fetch(\PDO::FETCH_ASSOC)) {
            $assocList[] = $row;
        }
        return $assocList;
    }
371468
public function getBasketArticles()
    {
        if ($this->_oBasketArtList === null) {
            $this->_oBasketArtList = false;
            if ($oBasket = $this->getBasket()) {
                $this->_oBasketArtList = $oBasket->getBasketArticles();
            }
        }

        return $this->_oBasketArtList;
    }
779819
public function getBargainArticleList()
    {
        if ($this->_blBargainAction) {
            if ($this->_aBargainArticleList === null) {
                $this->_aBargainArticleList = [];
                if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadAktion')) {
                    $articleList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                    $articleList->loadActionArticles('OXBARGAIN');
                    if ($articleList->count()) {
                        $this->_aBargainArticleList = $articleList;
                    }
                }
            }
        }

        return $this->_aBargainArticleList;
    }
104277
public function getTopStartActionArticles()
    {
        if ($this->_oActionArticles === null) {
            $this->_oActionArticles = false;
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('bl_perfLoadAktion')) {
                $oArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                $oArtList->loadActionArticles('OXTOPSTART');
                if ($oArtList->count()) {
                    $this->_oTopArticle = $oArtList->current();
                    $this->_oActionArticles = $oArtList;
                }
            }
        }

        return $this->_oActionArticles;
    }
419275
public function load()
    {
        // Initial state, is always empty array
        $data = array();

        // Alter $data in case it exists and its valid
        if ($this->storageAdapter->has($this->key)) {
            $target = $this->serializer->unserialize($this->storageAdapter->get($this->key));

            // If $target is null, then data either is damaged or doesn't exist, otherwise it's okay
            if ($target !== null) {
                $data = $target;
            }
        }

        return $data;
    }
1044493
public function getBasket()
    {
        if (is_null($this->basket)) {
            /** @var \OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException $exception */
            $exception = oxNew(\OxidEsales\PayPalModule\Core\Exception\PayPalMissingParameterException::class);
            throw $exception;
        }

        return $this->basket;
    }
1258564
public function _GetCacheParameters()
    {
        $aParams = parent::_GetCacheParameters();
        $oShop = TdbShop::GetInstance();

        $oActiveArticle = $oShop->GetActiveItem();
        if (!is_null($oActiveArticle)) {
            $aParams['articleId'] = $oActiveArticle->id;
        }

        return $aParams;
    }
424929
private function listBaskets()
    {
        /** @var BasketRepository $repo */
        $repo = $this->app['repo.baskets'];

        return array_map(function (Basket $basket) {
            return $this->listBasket($basket);
        }, $repo->findActiveByUser($this->getAuthenticatedUser()));
    }
464385
public function getToBasketLink()
    {
        if ($this->_sToBasketLink == null) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            if (\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine()) {
                $this->_sToBasketLink = $this->getLink();
            } else {
                // and assign special article values
                $this->_sToBasketLink = $myConfig->getShopHomeUrl();

                // override some classes as these should never showup
                $actControllerId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId();
                if ($actControllerId == 'thankyou') {
                    $actControllerId = 'basket';
                }
                $this->_sToBasketLink .= 'cl=' . $actControllerId;

                // this is not very correct
                if ($sActCat = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('cnid')) {
                    $this->_sToBasketLink .= '&amp;cnid=' . $sActCat;
                }

                $this->_sToBasketLink .= '&amp;fnc=tobasket&amp;aid=' . $this->getId() . '&amp;anid=' . $this->getId();

                if ($sTpl = basename(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('tpl'))) {
                    $this->_sToBasketLink .= '&amp;tpl=' . $sTpl;
                }
            }
        }

        return $this->_sToBasketLink;
    }