protected function _setupSort()
    {
        if (!($this->_sortEnabled = $this->_isSortEnabled())) {
            return;
        }

        $this->sortFields = $this->_getSortFields();

        foreach ($this->sortFields as $field => $options) {
            if (!isset($options['default'])) {
                continue;
            }
            $dir = strtolower($options['default']);
            if (in_array($dir, ['asc', 'desc'])) {
                $this->defaultSort = [
                    'field' => $field,
                    'dir' => $dir
                ];
            }
        }
    }