Get display order for the associated media.

@return array Empty array means default ordering.
777885
public function getMediaOrder()
    {
        $header = $this->header();

        return isset($header->media_order) ? array_map('trim', explode(',', (string)$header->media_order)) : [];
    }
1034583
public function getOrderArticleList()
    {
        if ($this->_aArticlesList === null) {
            // marking as set
            $this->_aArticlesList = false;
            $oOrdersList = $this->getOrderList();
            if ($oOrdersList && $oOrdersList->count()) {
                $this->_aArticlesList = oxNew(\OxidEsales\Eshop\Application\Model\ArticleList::class);
                $this->_aArticlesList->loadOrderArticles($oOrdersList);
            }
        }

        return $this->_aArticlesList;
    }
1129462
protected function arrayOrderBy()
    {
        $arguments = func_get_args();
        $data = array_shift($arguments);
        foreach ($arguments as $argument => $field) {
            if (is_string($field)) {
                $temp = [];
                foreach ($data as $key => $row) {
                    $temp[$key] = $row[$field];
                }
                $arguments[$argument] = $temp;
            }
        }
        $arguments[] = &$data;
        call_user_func_array('array_multisort', $arguments);

        return array_pop($arguments);
    }
984934
public function getOrdering()
    {
        // if the following code fails, fall back to this default ordering
        $orderBy = $this->conf['sortWithoutSearchword'];

        // if sorting in FE is allowed
        if ($this->conf['showSortInFrontend']) {
            $piVarsField = $this->pObj->piVars['sortByField'];
            $piVarsDir = $this->pObj->piVars['sortByDir'];
            $piVarsDir = ($piVarsDir == '') ? 'asc' : $piVarsDir;
            if (!empty($piVarsField)) { // if an ordering field is defined by GET/POST
                $isInList = GeneralUtility::inList($this->conf['sortByVisitor'], $piVarsField);
                if ($this->conf['sortByVisitor'] != '' && $isInList) {
                    $orderBy = $piVarsField . ' ' . $piVarsDir;
                }
                // if sortByVisitor is not set OR not in the list of
                // allowed fields then use fallback ordering in "sortWithoutSearchword"
            }
            // if sortByVisitor is not set OR not in the list of
            //allowed fields then use fallback ordering in "sortWithoutSearchword"
        } else {
            if (!empty($this->pObj->wordsAgainst)) { // if sorting is predefined by admin
                $orderBy = $this->conf['sortByAdmin'];
            } else {
                $orderBy = $this->conf['sortWithoutSearchword'];
            }
        }

        return $orderBy;
    }
745371
public function index() {

		// Use a custom media type holder template if one exists.

		$type = $this->data()->MediaType();
		$templates = array();
		if($type->exists()) {
			$templates[] = 'MediaHolder_' . str_replace(' ', '', $type->Title);
		}
		$templates[] = 'MediaHolder';
		$templates[] = 'Page';
		$this->extend('updateTemplates', $templates);
		return $this->renderWith($templates);
	}
465987
public function getOrderList()
    {
        if ($this->_aOrderList === null) {
            $this->_aOrderList = [];

            // Load user Orderlist
            if ($oUser = $this->getUser()) {
                $iNrofCatArticles = (int) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('iNrofCatArticles');
                $iNrofCatArticles = $iNrofCatArticles ? $iNrofCatArticles : 1;
                $this->_iAllArtCnt = $oUser->getOrderCount();
                if ($this->_iAllArtCnt && $this->_iAllArtCnt > 0) {
                    $this->_aOrderList = $oUser->getOrders($iNrofCatArticles, $this->getActPage());
                    $this->_iCntPages = ceil($this->_iAllArtCnt / $iNrofCatArticles);
                }
            }
        }

        return $this->_aOrderList;
    }
1744
public function getSortStructure()
    {
        $sort = [$this->getField() => (object)['order' => $this->getOrder()]];

        if ($this->getMode()) {
            $sort[$this->getField()]->mode = $this->getMode();
        }
        if ($this->getMissing()) {
            $sort[$this->getField()]->missing = $this->getMissing();
        }

        return (object)$sort;
    }
94060
public function index()
    {
        $items = Banner::active()->orderBy('list_order')->get();

        return $this->view('titan::banners.order')->with('items', $items);
    }
48941
public function getSortOrder()
    {
        $sortOrder = isset($this->requestParams[self::PARAM_SORT_ORDER]) ?
            $this->requestParams[self::PARAM_SORT_ORDER] : self::DEFAULT_SORT_ORDER;
        $sortOrder = mb_strtolower($sortOrder);

        if (!in_array($sortOrder, ['asc', 'desc'])) {
            $sortOrder = self::DEFAULT_SORT_ORDER;
        }

        return $sortOrder;
    }
570735
protected function getDiscountLinesOrder()
    {
        $result = array();

        foreach ($this->order->getCartRules() as $line) {
            $result[] = $this->getDiscountLineOrder($line);
        }

        return $result;
    }
438810
public function first()
    {
        $this->sort();

        return !empty($this->items) ? reset($this->items) : null;
    }
678167
private function getMediaTypes()
    {
        $counter = 1;

        $types = [];
        $types[$counter++] = 'None';
        $types[$counter++] = 'File';
        $types[$counter++] = 'Image';
        $types[$counter++] = 'Video';

        return $types;
    }
886485
public function getOrderBy()
    {
        if ($this->getConfig()->getDefaultOrderField() === false) {
            return false;
        }
        
        return $this->getConfig()->getDefaultOrderDirection() . $this->getConfig()->getDefaultOrderField();
    }
348160
protected function getOrder()
    {
        if (null === $this->order) {
            $this->order = $this->getSession() ? $this->getSession()->getOrder() : null;
        }

        return $this->order;
    }
588465
public function getFirstCategoryPur()
    {
        $firstOrderId = $this->model->getFirstOrderId();
        $order = $this->orderFactory->create();
        $this->orderResource->load($order, $firstOrderId);
        $categoryIds = $this->getCategoriesFromOrderItems($order->getAllItems());

        return $this->getCategoryNames($categoryIds);
    }
1169434
public function toArray()
    {
        $result             = parent::toArray();
        $result['mediaId']  = $this->mediaId;
        $result['format']   = $this->format;

        return $result;
    }
885040
public function getSortedImages()
    {
        $imagesSort = explode(',', $this->getImagesSort());
        $orderCollection = array_reverse($imagesSort);
        $imagesCollection = $this
            ->getImages()
            ->toArray();

        usort(
            $imagesCollection,
            function (
                \Elcodi\Component\Media\Entity\Interfaces\ImageInterface $a,
                \Elcodi\Component\Media\Entity\Interfaces\ImageInterface $b
            ) use ($orderCollection) {

                $aPos = array_search($a->getId(), $orderCollection);
                $bPos = array_search($b->getId(), $orderCollection);

                return ($aPos < $bPos)
                    ? 1
                    : -1;
            }
        );

        return new ArrayCollection($imagesCollection);
    }