src/Page/ProductCategoryController.php
public function getSorter()
    {
        $options = array();
        foreach (ProductCategory::config()->sort_options as $k => $v) {
            // make the label translatable
            $k = _t(ProductCategory::class . '.' . $k, $k);
            $options[$k] = $v;
        }

        $sorter = ListSorter::create($this->request, $options);
        $this->extend('updateSorter', $sorter);

        return $sorter;
    }
public function getSorter()
    {
        $options = array();
        foreach (ProductCategory::config()->sort_options as $k => $v) {
            // make the label translatable
            $k = _t(ProductCategory::class . '.' . $k, $k);
            $options[$k] = $v;
        }

        $sorter = ListSorter::create($this->request, $options);
        $this->extend('updateSorter', $sorter);

        return $sorter;
    }
Sorting controls

@return ListSorter sorter