Restores the sorting based on defaultOrder

@return void
338935
public function restoreSorting(array $scope = []): void
    {
        $records = $this->_table->find()
            ->select([$this->_table->getPrimaryKey(), $this->getConfig('sortField')])
            ->select($this->getConfig('columnScope'))
            ->order($this->getConfig('defaultOrder'));

        if (!empty($scope)) {
            $records->where($scope);
        }

        $sorts = [];
        foreach ($records as $entity) {
            $individualScope = '';
            foreach ($this->getConfig('columnScope') as $column) {
                $individualScope .= $entity->get($column);
            }

            if (!isset($sorts[$individualScope])) {
                $sorts[$individualScope] = 0;
            }

            $sort = ++$sorts[$individualScope];
            $this->_table->updateAll([
                $this->getConfig('sortField') => $sort,
            ], [
                $this->_table->getPrimaryKey() => $entity->get($this->_table->getPrimaryKey()),
            ]);
        }
    }
925318
private function _sortIndex()
    {
        $collection = ResourceTable::collection();
        $sort = $collection->getSort();

        return $sort['index'] ? $sort['index'] : null;
    }
987623
public function getDefaultOrder($alias = 't')
    {
        if (is_null($this->_defaultOrder)) {
            $this->_defaultOrder = $this->getDescriptorDefaultOrder('{alias}');
        }
        $sortBy = [];
        foreach ($this->_defaultOrder as $key => $value) {
            $sortBy[strtr($key, ['{alias}' => $alias])] = $value;
        }

        return $sortBy;
    }
33912
protected function sortProviders()
    {
        // fix: uasort(): Array was modified by the user comparison function
        $simpleProviders = [];
        foreach ($this->providers as $name => $provider) {
            $simpleProviders[$name] = $provider->getPriority();
        }
        asort($simpleProviders);
        $providers = [];
        foreach ($simpleProviders as $name => $priority) {
            $providers[$name] = $this->providers[$name];
        }
        $this->providers = $providers;
    }
523124
public function restore()
    {
        $types = [
            'javascript',
            'css',
            'customScript',
            'customCSS',
            'customHeadTags',
            'combinedFiles',
        ];
        foreach ($types as $type) {
            $this->{$type} = $this->disabled[$type];
        }
    }
797589
@Override
    protected void defaultSort(Comparator<? super E> comparator)
    {
        FastList<E> list = comparator == null
                ? (FastList<E>) this.toSortedList()
                : (FastList<E>) this.toSortedList(comparator);
        this.lists.clear();
        this.lists.add(list);
    }
971714
protected function defaultOrdering()
    {
        $criteria = $this->request->orderableColumns();
        if (! empty($criteria)) {
            $sorter = $this->getSorter($criteria);

            $this->collection = $this->collection
                ->map(function ($data) {
                    return array_dot($data);
                })
                ->sort($sorter)
                ->map(function ($data) {
                    foreach ($data as $key => $value) {
                        unset($data[$key]);
                        array_set($data, $key, $value);
                    }

                    return $data;
                });
        }
    }
892148
public function getDefaultSorting()
    {
        $aSorting = parent::getDefaultSorting();

        $oCategory = $this->getActiveCategory();

        if ($this->getListType() != 'search' && $oCategory && $oCategory instanceof \OxidEsales\Eshop\Application\Model\Category) {
            if ($sSortBy = $oCategory->getDefaultSorting()) {
                $sSortDir = ($oCategory->getDefaultSortingMode()) ? "desc" : "asc";
                $aSorting = ['sortby' => $sSortBy, 'sortdir' => $sSortDir];
            }
        }

        return $aSorting;
    }
1067717
public function initHasSortOrder()
    {
        $this->fillable = array_merge($this->fillable, $this->hasSortOrderFillableFields);
        $this->casts = array_merge($this->casts, $this->hasSortOrderCastFields);
    }
162112
public function disableSorting(): void
    {
        if ($this->request->getQueryParam("sort") !== null) {
            throw $this->exceptionFactory->createSortingUnsupportedException($this->request);
        }
    }
1222366
def restore_defaults_ratio(self):
        """"""
        # Set the flag to true because user ask to.
        self.is_restore_default = True
        # remove current default ratio
        for i in reversed(list(range(self.container_layout.count()))):
            widget = self.container_layout.itemAt(i).widget()
            if widget is not None:
                widget.setParent(None)

        # reload default ratio
        self.restore_default_values_page()
442728
public function sortReleases()
	{
		// If there is an unreleased release pull that out and sort the rest
		$unreleased = null;
		if (isset($this->releases['unreleased']))
		{
			$unreleased = $this->releases['unreleased'];
			unset($this->releases['unreleased']);
		}

		$order = Sort::sort(array_keys($this->releases));
		$order = array_reverse($order);

		$newOrder = [];
		/** @var Version $version */
		foreach ($order as $version)
		{
			$index = $version->__toString();
			$newOrder[$index] = $this->releases[$index];
		}

		if ($unreleased !== null)
		{
			$newOrder = ['unreleased' => $unreleased] + $newOrder;
		}

		$this->releases = $newOrder;
	}
220120
private function sort()
    {
        if ($this->sort) {
            return $this->sort;
        };
        return $this->sort = array_multisort($this->cleanParam) && ksort($this->cleanParam);
    }
702611
public function rewind()
    {
        usort(
            $this->entries, function ($a, $b) {
            return $a['priority'] - $b['priority'];
        }
        );
        $this->position = 0;
        $this->sorted = true;
    }
1018591
public function onSetSorting()
    {
        $sortBy = Input::get('sortBy', $this->getSortBy());
        $sortDirection = Input::get('sortDirection', $this->getSortDirection());
        $path = Input::get('path');

        $this->setSortBy($sortBy);
        $this->setSortDirection($sortDirection);
        $this->setCurrentFolder($path);

        $this->prepareVars();

        return [
            '#'.$this->getId('item-list') => $this->makePartial('item-list'),
            '#'.$this->getId('folder-path') => $this->makePartial('folder-path')
        ];
    }
585637
public function sort()
    {
        $values = $this->toArray();
        ksort($values);
        
        $this->clear();
        
        foreach($values as $index => $value) {
            $this->set($index,$value);
        }
        
        return $this;
    }
1267268
public function setDefaultSort($sort, $use_on_reset = true)
	{
		if (is_string($sort)) {
			$sort = [$sort => 'ASC'];
		} else {
			$sort = (array) $sort;
		}

		$this->default_sort = $sort;
		$this->default_sort_use_on_reset = (bool) $use_on_reset;

		return $this;
	}