Returns order article selection list array

@param string $sArtId           ordered article id [optional]
@param string $sOrderArtSelList order article selection list [optional]

@return array
339067
public function getOrderArticleSelectList($sArtId = null, $sOrderArtSelList = null)
    {
        if ($this->_aOrderArticleSelList === null) {
            $sOrderArtSelList = $sOrderArtSelList ? $sOrderArtSelList : $this->oxorderarticles__oxselvariant->value;

            $sOrderArtSelList = explode(' || ', $sOrderArtSelList)[0];

            $aRet = [];

            if ($oArticle = $this->_getOrderArticle($sArtId)) {
                $aList = explode(", ", $sOrderArtSelList);
                $oStr = getStr();

                $aArticleSelList = $oArticle->getSelectLists();

                //formatting temporary list array from string
                if (count($aArticleSelList) > 0) {
                    foreach ($aList as $sList) {
                        if ($sList) {
                            $aVal = explode(":", $sList);
                            if (isset($aVal[0]) && isset($aVal[1])) {
                                $sOrderArtListTitle = $oStr->strtolower(trim($aVal[0]));
                                $sOrderArtSelValue = $oStr->strtolower(trim($aVal[1]));

                                //checking article list for matches with article list stored in oxOrderItem
                                $iSelListNum = 0;
                                foreach ($aArticleSelList as $aSelect) {
                                    //check if selects titles are equal

                                    if ($oStr->strtolower($aSelect['name']) == $sOrderArtListTitle) {
                                        //try to find matching select items value
                                        $iSelValueNum = 0;
                                        foreach ($aSelect as $oSel) {
                                            if ($oStr->strtolower($oSel->name) == $sOrderArtSelValue) {
                                                // found, adding to return array
                                                $aRet[$iSelListNum] = $iSelValueNum;
                                                break;
                                            }
                                            //next article list item
                                            $iSelValueNum++;
                                        }
                                    }
                                    //next article list
                                    $iSelListNum++;
                                }
                            }
                        }
                    }
                }
            }

            $this->_aOrderArticleSelList = $aRet;
        }

        return $this->_aOrderArticleSelList;
    }
1357613
protected function _listeGetLi()
    {
        $im = $this->_defList[count($this->_defList)-1]['img'];
        $st = $this->_defList[count($this->_defList)-1]['style'];
        $nb = $this->_defList[count($this->_defList)-1]['nb'];
        $up = (substr($st, 0, 6) === 'upper-');

        if ($im) {
            return array(false, false, $im);
        }

        switch ($st) {
            case 'none':
                return array('helvetica', true, ' ');

            case 'upper-alpha':
            case 'lower-alpha':
                $str = '';
                while ($nb>26) {
                    $str = chr(96+$nb%26).$str;
                    $nb = floor($nb/26);
                }
                $str = chr(96+$nb).$str;

                return array('helvetica', false, ($up ? strtoupper($str) : $str).'.');

            case 'upper-roman':
            case 'lower-roman':
                $str = $this->_listeArab2Rom($nb);

                return array('helvetica', false, ($up ? strtoupper($str) : $str).'.');

            case 'decimal':
                return array('helvetica', false, $nb.'.');

            case 'square':
                return array('zapfdingbats', true, chr(110));

            case 'circle':
                return array('zapfdingbats', true, chr(109));

            case 'disc':
            default:
                return array('zapfdingbats', true, chr(108));
        }
    }
436320
public function discardArticleReservation($sArticleId)
    {
        $dReserved = $this->getReservedAmount($sArticleId);
        if ($dReserved) {
            $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
            if ($oArticle->load($sArticleId)) {
                $oArticle->reduceStock(-$dReserved, true);
                $this->getReservations()->addItemToBasket($sArticleId, 0, null, true);
                $this->_aCurrentlyReserved = null;
            }
        }
    }
1232953
public function listComments(string $gistId): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/gists/:gist_id/comments', $gistId));
    }
853119
public function RemoveArticleFromNoticeList($sArticleId)
    {
        $this->GetNoticeListArticles();
        if (array_key_exists($sArticleId, $this->aNoticeList)) {
            unset($this->aNoticeList[$sArticleId]);
            if ($this->IsLoggedIn()) {
                $noticeListItemObject = TdbShopUserNoticeList::GetNewInstance();
                if (true === $noticeListItemObject->LoadFromFields(
                    array(
                        'data_extranet_user_id' => $this->id,
                        'shop_article_id' => $sArticleId,
                    )
                )) {
                    $noticeListItemObject->Delete();
                }
            } else {
                $this->CommitNoticeListToCookie();
            }
        }
    }
211912
public function getContentByPidFrom(int $articleId, string $pTable): array
    {
        $result = $this->connection->createQueryBuilder()
            ->select('id', 'type')
            ->from('tl_content')
            ->where('pid=:pid')
            ->setParameter('pid', $articleId)
            ->andWhere('ptable=:ptable')
            ->setParameter('ptable', $pTable)
            ->orderBy('sorting')
            ->execute()
            ->fetchAll(\PDO::FETCH_ASSOC);

        return $result;
    }
704705
public function listPaths(array $composerContent)
    {
        $paths = [];

        if (isset($composerContent['autoload']['psr-0'])) {
            $paths = array_merge($paths, $this->getPsrPaths($composerContent['autoload']['psr-0']));
        }

        if (isset($composerContent['autoload']['classmap'])) {
            $paths = array_merge($paths, array_values($composerContent['autoload']['classmap']));
        }

        if (isset($composerContent['autoload']['files'])) {
            $paths = array_merge($paths, array_values($composerContent['autoload']['files']));
        }

        if (isset($composerContent['autoload']['psr-4'])) {
            $paths = array_merge($paths, $this->getPsrPaths($composerContent['autoload']['psr-4']));
        }

        return array_values(array_unique($paths));
    }
350912
public function getSelectLists($sKeyPrefix = null)
    {
        $aSelLists = [];
        if ($oArticle = $this->_getOrderArticle()) {
            $aSelLists = $oArticle->getSelectLists();
        }

        return $aSelLists;
    }
279988
public function getNoticeListArtCnt()
    {
        if ($this->_iCntNoticeListArticles === null) {
            $this->_iCntNoticeListArticles = 0;
            if ($this->getId()) {
                $this->_iCntNoticeListArticles = $this->getBasket('noticelist')->getItemCount();
            }
        }

        return $this->_iCntNoticeListArticles;
    }
823579
public function getPostFindActions()
    {
        $actions = [];

        empty($this->orderBy) || $actions[] = ['sort', $this->orderBy];
        $this->skip === null || $actions[] = ['skip', $this->skip];
        $this->limit === null || $actions[] = ['limit', $this->limit];

        return $actions;
    }
961161
public function getItemsByOrderId($orderId)
    {
        $result = [];
        /* aliases and tables */
        $asOrder = 'sale';
        $asPvItem = 'pv';
        $tblOrder = [$asOrder => $this->resource->getTableName(Cfg::ENTITY_MAGE_SALES_ORDER_ITEM)];
        $tblPvItem = [$asPvItem => $this->resource->getTableName(Entity::ENTITY_NAME)];
        /* SELECT FROM sales_order_item */
        $query = $this->conn->select();
        $cols = [];
        $query->from($tblOrder, $cols);
        /* LEFT JOIN prxgt_pv_sale_item pwq */
        $on = $asPvItem . '.' . Entity::A_ITEM_REF . '=' . $asOrder . '.' . Cfg::E_SALE_ORDER_ITEM_A_ITEM_ID;
        $cols = '*'; // get all columns
        $query->joinLeft($tblPvItem, $on, $cols);
        /* WHERE */
        $where = $asOrder . '.' . Cfg::E_SALE_ORDER_ITEM_A_ORDER_ID . '=' . (int)$orderId;
        $query->where($where);
        /* fetch data */
        $rows = $this->conn->fetchAll($query);
        foreach ($rows as $row) {
            /** @var Entity $item */
            $item = new Entity($row);
            $result[$item->getItemRef()] = $item;
        }
        return $result;
    }
966703
public function select($sSelector, $sOptionSelector)
    {
        $oSelectorsHandler = $this->getMinkSession()->getSelectorsHandler();
        $oSelect = null;

        if (strpos($sSelector, '/') === false) {
            $page = $this->getMinkSession()->getPage();
            $sParsedSelector = $oSelectorsHandler->xpathLiteral($sSelector);
            $oSelect = $page->find('named', array('select', $sParsedSelector));
        }

        if (is_null($oSelect)) {
            $oSelect = $this->getElementLazy($sSelector);
        }

        if (strpos($sOptionSelector, 'index=') === 0) {
            $iIndex = str_replace('index=', '', $sOptionSelector);
            $sOptionSelector = $this->_getSelectOptionByIndex($oSelect, $iIndex);
        } else {
            $sOptionSelector = str_replace(array('label=', 'value='), '', $sOptionSelector);
        }

        if (is_null($oSelect)) {
            $this->fail("Select '$sSelector' was not found!");
        }

        $oOptions = $oSelect->findAll('named', array('option', $oSelectorsHandler->xpathLiteral($sOptionSelector)));

        $oOption = $this->_getExactMatch($oOptions, $sOptionSelector);

        if (is_null($oOption)) {
            $this->fail("Option '$sOptionSelector' was not found in '$sSelector' select ");
        }

        $this->getMinkSession()->getDriver()->selectOption(
            $oSelect->getXpath(), $oOption->getValue(), false
        );

        $this->fireEvent($sSelector, 'change');
    }
1371607
public function getLastProducts($iCnt = 4)
    {
        if ($this->_aLastProducts === null) {
            //last seen products for #768CA
            $oProduct = $this->getProduct();
            $sParentIdField = 'oxarticles__oxparentid';
            $sArtId = $oProduct->$sParentIdField->value ? $oProduct->$sParentIdField->value : $oProduct->getId();

            $oHistoryArtList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
            $oHistoryArtList->loadHistoryArticles($sArtId, $iCnt);
            $this->_aLastProducts = $oHistoryArtList;
        }

        return $this->_aLastProducts;
    }
906992
public function getTree($lang = "", $postTypeID)
    {
        $orderBy = (isset($_GET['order'])) ? $orderBy = $_GET['order'] : 'order';
        $orderType = (isset($_GET['type'])) ? $orderType = $_GET['type'] : 'ASC';
        $parentList = Category::where('postTypeID', $postTypeID)->where('parentID', null)
            ->orWhere('parentID', 0)
            ->orderBy($orderBy, $orderType)
            ->paginate(Category::$rowsPerPage);

        $category = new Category();

        // get all categories of the selected post type
        $category->categoryList = Category::where('postTypeID', $postTypeID)
            ->orderBy($orderBy, $orderType)
            ->select("categoryID", "title", "slug")
            ->get();
        
        // make the parent child format tree
        $treeList = collect($category->makeChildrenTree($category->categoryList));

        // get only categories selected for this page (pagination)
        $tmp = [];
        foreach($parentList->items() as $item){
            $getCategory = $treeList->where('categoryID', $item->categoryID)->first();
            if($getCategory) {
                $tmp[] = $getCategory;
            }
        }

        $parentList->setCollection(collect($tmp));
        return Language::filterRows($parentList);
    }
311604
protected function _updateArticleVarName($sUpdate, $sArtId)
    {
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sUpdate = "update oxarticles set " . $sUpdate . " where oxid = " . $oDb->quote($sArtId);
        $oDb->Execute($sUpdate);
    }
419881
static function fetchList( $localeList = array() )
    {
        $ini = eZINI::instance();

        $dir = $ini->variable( 'RegionalSettings', 'TranslationRepository' );

        $fileInfoList = array();
        $translationList = array();
        $locale = '';

        if ( count( $localeList ) == 0 )
        {
            $localeList = eZDir::findSubdirs( $dir );
        }

        foreach( $localeList as $locale )
        {
            if ( $locale != 'untranslated' )
            {
                $translationFiles = eZDir::findSubitems( $dir . '/' . $locale, 'f' );

                foreach( $translationFiles as $translationFile )
                {
                    if ( eZFile::suffix( $translationFile ) == 'ts' )
                    {
                        $translationList[] = new eZTSTranslator( $locale,  $translationFile );
                    }
                }
            }
        }

        return $translationList;
    }
588220
public function hasArticleId($sArtId)
    {
        if ($this->getArticleId() == $sArtId) {
            return true;
        }

        $aSubvariants = $this->getMdSubvariants();
        foreach ($aSubvariants as $oSubvariant) {
            if ($oSubvariant->hasArticleId($sArtId)) {
                return true;
            }
        }

        return false;
    }