Get **sort** command of current request.

@return array
11428
public function getSort()
    {
        $sorts = $get = $this->request->get('!sort') ?: array();

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

        return $sorts;
    }
1322337
public static function getOrder()
    {
        $cls = get_called_class();
        return array_key_exists($cls, self::$_order) ? self::$_order[$cls] : "";
    }
1166516
public static function orderBy(): array
    {
        $args = \func_get_args();
        $data = array_shift($args);
        foreach ($args as $n => $field) {
            if (\is_string($field)) {
                $tmp = [];
                foreach ($data as $key => $row) {
                    $tmp[$key] = $row[$field];
                }
                $args[$n] = $tmp;
            }
        }
        $args[] = &$data;
        array_multisort($args);
        return array_pop($args);
    }
679817
protected function _getSorting()
    {
        $sOrder = '';
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid')) {
            $sOrder = parent::_getSorting();
        } elseif (($aSkipArt = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('neworder_sess'))) {
            $sOrderBy = '';
            $sArtTable = $this->_getViewName('oxarticles');
            $sSep = '';
            foreach ($aSkipArt as $sId) {
                $sOrderBy = " $sArtTable.oxid=" . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sId) . " " . $sSep . $sOrderBy;
                $sSep = ", ";
            }
            $sOrder = "order by " . $sOrderBy;
        }

        return $sOrder;
    }
131620
public function getOrderedItems()
    {
        if (config('menus.ordering') || $this->ordering) {
            return $this->toCollection()->sortBy(function ($item) {
                return $item->order;
            })->all();
        }

        return $this->items;
    }
63568
public function sortUrl()
    {
        $url = Request::url();
        $params = Input::get();

        $params['order_by'] = $this->index();
        if ($this->sortActive()) {
            $params['order_dir'] = mb_strtolower($this->_sortDirection()) == 'desc' ? 'ASC' : 'DESC';
        } else {
            $params['order_dir'] = ResourceTable::DEFAULT_SORT_DIR;
        }

        return $url.'?'.http_build_query($params);
    }
999057
public function sort()
    {
        $deps = $this->all();
        $sorted = $this->sortDeps($deps);

        return $this->dependency->getSorted($sorted);
    }
395890
public function sort()
    {
        array_multisort(array_map(function ($pair) {
            return mb_convert_encoding($pair[0], 'UTF-16BE', 'UTF-8');
        }, $this->list), SORT_STRING, range(1, count($this->list)), $this->list);
    }
999526
private function getSortOrder()
    {
        return [
            $this->translator->trans(/** @Desc("Ascending") */ 'content_type.sort_field.ascending', [], 'content_type') => Location::SORT_ORDER_ASC,
            $this->translator->trans(/** @Desc("Descending") */ 'content_type.sort_field.descending', [], 'content_type') => Location::SORT_ORDER_DESC,
        ];
    }
618275
protected function sortResolvers()
    {
        $sortedResolvers = array();
        krsort($this->resolvers);

        foreach ($this->resolvers as $resolvers) {
            $sortedResolvers = array_merge($sortedResolvers, $resolvers);
        }

        return $sortedResolvers;
    }
1255571
protected function getListOrder()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->order->getList($conditions);
        $this->prepareListOrder($list);

        return $list;
    }
508370
public function getSortingOrder()
    {
        $result = Symphony::Configuration()->get('section_' . $this->get('handle') . '_order', 'sorting');

        return (is_null($result) ? 'asc' : $result);
    }
1367061
protected function sortData() {
        $columns = $this->getOrder();
        $order = [];
        foreach ($columns as $column) {
            if ($column[0] === '-') {
                $column = substr($column, 1);
                $order[$column] = -1;
            } else {
                $order[$column] = 1;
            }
        }

        $cmp = function ($a, $b) use ($order) {
            foreach ($order as $column => $desc) {
                $r = strnatcmp($a[$column], $b[$column]);

                if ($r !== 0) {
                    return $r * $desc;
                }
            }
            return 0;
        };

        usort($this->data, $cmp);
    }
885675
public function getCommands()
    {
        $commands = $this->getModuleCommands($this->app);
        sort($commands);
        return array_unique($commands);
    }
638862
protected function getCommands()
    {
        return \array_merge($this->commands, [
            \Illuminate\Console\Scheduling\ScheduleRunCommand::class,
            \Laravel\Lumen\Console\Commands\ServeCommand::class,
        ]);
    }
210218
private function getSortOrderChoices()
    {
        $choices = [];
        foreach ($this->getSortOrder() as $label => $value) {
            $choices[$label] = $value;
        }

        return $choices;
    }
82986
protected function _sort()
    {
        if (!isset($this->_sorts) || count($this->_sorts) === 0) {
            return;
        }

        $columns      = $this->_dataGrid->getActiveColumnsOrdered();
        $sorts        = $this->_sorts;
        $sortPosition = $this->_sortPositions;

        usort($this->_output, function ($a, $b) use ($columns, $sortPosition, $sorts) {
            foreach ($sortPosition as $colIndex) {
                $sort = $sorts[$colIndex];
                /** @var $sort\RBM\Datagrid\Data\Sort */
                /** @var $column\RBM\Datagrid\Column */
                $column = $columns[$colIndex];
                $valueA = $column->getSortData($a);
                $valueB = $column->getSortData($b);

                if ($valueA == $valueB) {
                    continue;
                }

                $arr = array($valueA, $valueB);

                $args = array_merge(array(&$arr), array($sort->getDirection(), $sort->getType()));
                call_user_func_array('array_multisort', $args);

                return ($arr[0] == $valueA) ? -1 : 1;
            }
            return 0;
        });
    }