Returns the sort order for this Section. Defaults to 'asc'.

@since Symphony 2.3
@return string
Either 'asc' or 'desc'.
508370
public function getSortingOrder()
    {
        $result = Symphony::Configuration()->get('section_' . $this->get('handle') . '_order', 'sorting');

        return (is_null($result) ? 'asc' : $result);
    }
891388
public function getOrderCnt()
    {
        if ($this->_iOrderCnt === null) {
            $this->_iOrderCnt = 0;
            if ($oUser = $this->getUser()) {
                $this->_iOrderCnt = $oUser->getOrderCount();
            }
        }

        return $this->_iOrderCnt;
    }
1070513
public function orderByToSort()
    {
        $sort = '';
        if (empty($this->orderBy) || !is_array($this->orderBy)) {
            return $sort;
        }
        foreach ($this->orderBy as $field => $direction) {
            $sort = ($direction == SORT_DESC ? '-' : '') . $field;
            break;
        }
        return $sort;
    }
197569
public function getOrdered()
    {
        if (!$this->sort) {
            return $this->content;
        }

        $unordered = [];
        foreach ($this->content as $content) {
            $unordered[$content->getId()] = $content;
        }

        $ordered = [];
        $sort = json_decode($this->sort, true);
        $order = $sort['order'];
        foreach ($order as $id) {
            if (isset($unordered[$id])) {
                $ordered[] = $unordered[$id];
            }
        }

        return $ordered;
    }
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;
    }
1005955
public function getOrderCnt()
    {
        if ($this->_iOrderCnt === null) {
            $this->_iOrderCnt = 0;
            if ($user = $this->getUser()) {
                $this->_iOrderCnt = $user->getOrderCount();
            }
        }

        return $this->_iOrderCnt;
    }
927679
public function getSorting()
    {
        $sortOrder = $this->getRequest()->get('sortOrder', 'asc');
        $sortBy = $this->getRequest()->get('sortBy', 'id');

        return [$sortBy => $sortOrder];
    }
1111687
protected function buildOrder()
    {
        $result = '';

        $orders = (array) $this->getOrder();
        foreach ($orders as $field => $direction) {
            if ($result != '') {
                $result.=',';
            }
            $result.=$field.' '.($direction === SORT_DESC ? 'DESC' : 'ASC');
        }
        if ($result != '') {
            $result = 'ORDER BY '.$result;
        }

        return $result;
    }
643698
public function getOrderBy()
    {
        $orderColumn = $this->getOrderColumn();

        if (is_array($orderColumn)) {
            // An order by raw statement
            return $orderColumn[0];
        }

        $selectedColumnNames = $this->getSelectColumns();

        if (! in_array($orderColumn, $selectedColumnNames)) {
            throw IncorrectOrderColumn::name($orderColumn);
        }

        $order = request('order');

        return [$orderColumn, $order[0]['dir']];
    }
894811
public function getListSorting()
    {
        $sorting = parent::getListSorting();
        if (isset($sorting["oxorder"]["oxbilllname"])) {
            $this->_blDesc = false;
        }

        return $sorting;
    }
544183
public function getCommitOrder()
    {
        // Check whether we need to do anything. 0 or 1 node is easy.
        $nodeCount = count($this->_classes);

        if ($nodeCount <= 1) {
            return ($nodeCount == 1) ? array_values($this->_classes) : array();
        }

        // Init
        foreach ($this->_classes as $node) {
            $this->_nodeStates[$node->name] = self::NOT_VISITED;
        }

        // Go
        foreach ($this->_classes as $node) {
            if ($this->_nodeStates[$node->name] == self::NOT_VISITED) {
                $this->_visitNode($node);
            }
        }

        $sorted = array_reverse($this->_sorted);

        $this->_sorted = $this->_nodeStates = array();

        return $sorted;
    }
45299
protected function getOrderBy() {
		$order = [];
			
		foreach ($this->getOption('query.orderBy') as $attr) {
			$type = null;
			
			if ($attr instanceof Attr) {
				$name = $attr->getName();
				$type = $attr->getType();
			}
			elseif (is_string($attr)) {
				$expr = explode(' ', $attr);
				$name = $expr[0];
				
				if (count($expr) > 1) {
					$type = strtolower($expr[1]);
					if ($type != 'asc' && $type != 'desc')
						$type = null;
				}	
			}
			else
				throw new \InvalidArgumentException("Invalid order attribute defined: Expected a string or \eMapper\Query\Attr instance");
			
			$order[] = Attr::__callstatic($name)->type($type);
		}
		
		return $order;
	}
413117
public function getSortField()
    {
        if ($this->_sortField === false) {
            return [];
        }

        if ($this->_sortField) {
            // 
            if (is_array($this->_sortField)) {
                return [$this->name => $this->_sortField];
            } 

            return [$this->name => [
                'asc' => [$this->_sortField => SORT_ASC],
                'desc' => [$this->_sortField => SORT_DESC]
            ]];
        }
        
        return [$this->name];
    }
11428
public function getSort()
    {
        $sorts = $get = $this->request->get('!sort') ?: array();

        foreach ($sorts as $key => &$value) {
            $value = (int) $value;
        }

        return $sorts;
    }
944945
private function sort()
    {
        if ($this->sort) {
            return $this->sort;
        };
        return $this->sort = rsort($this->path) && usort($this->path, function ($a, $b) {
                // PHP 7: Switch to the <=> "Spaceship" operator
                return mb_strlen($a) - mb_strlen($b);
            });
    }
34095
private function getOrderDirection(): string
    {
        $result = !empty($this->searchData['sort_by_order']) ?
            $this->searchData['sort_by_order'] :
            Options::DEFAULT_SORT_BY_ORDER;

        return $result;
    }
2244
protected function getSortColumn()
    {
        if (!$this->isSortable()) {
            return false;
        }

        if ($this->sortColumn !== null) {
            return $this->sortColumn;
        }

        /*
         * User preference
         */
        if ($this->showSorting && ($sortOptions = $this->getSession('sort'))) {
            $this->sortColumn = $sortOptions['column'];
            $this->sortDirection = $sortOptions['direction'];
        }

        /*
         * Supplied default
         */
        else {
            if (is_string($this->defaultSort)) {
                $this->sortColumn = $this->defaultSort;
                $this->sortDirection = 'desc';
            }
            elseif (is_array($this->defaultSort) && isset($this->defaultSort['column'])) {
                $this->sortColumn = $this->defaultSort['column'];
                $this->sortDirection = $this->defaultSort['direction'] ?? 'desc';
            }
        }

        /*
         * First available column
         */
        if ($this->sortColumn === null || !$this->isSortable($this->sortColumn)) {
            $columns = $this->visibleColumns ?: $this->getVisibleColumns();
            $columns = array_filter($columns, function ($column) { return $column->sortable; });
            $this->sortColumn = key($columns);
            $this->sortDirection = 'desc';
        }

        return $this->sortColumn;
    }