- public function getCurrentDirection()
- {
- $dir = $this->_getData('_current_grid_direction');
- if ($dir) {
- return $dir;
- }
-
- $directions = ['asc', 'desc'];
- $dir = strtolower($this->_toolbarModel->getDirection());
- if (!$dir || !in_array($dir, $directions)) {
- $dir = $this->_direction;
- }
-
- if ($dir != $this->_direction) {
- $this->_memorizeParam('sort_direction', $dir);
- }
-
- $this->setData('_current_grid_direction', $dir);
- return $dir;
- }