Block/Post/PostList/Toolbar.php
public function getCurrentDirection()
    {
        $dir = $this->_getData('blog_current_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('blog_current_direction', $dir);

        return $dir;
    }
public function getCurrentDirection()
    {
        $dir = $this->_getData('blog_current_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('blog_current_direction', $dir);

        return $dir;
    }
public function getCurrentDirection ( ) { $ dir = $ this -> _getData ( 'blog_current_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 ( 'blog_current_direction' , $ dir ) ; return $ dir ; }
Retrieve current direction.

@return string
Retrieve current direction .