Block/Post/PostList/Toolbar.php
public function setDefaultDirection($dir)
    {
        if (in_array(strtolower($dir), ['asc', 'desc'])) {
            $this->direction = strtolower($dir);
        }

        return $this;
    }
public function setDefaultDirection($dir)
    {
        if (in_array(strtolower($dir), ['asc', 'desc'])) {
            $this->direction = strtolower($dir);
        }

        return $this;
    }
public function setDefaultDirection ( $ dir ) { if ( in_array ( strtolower ( $ dir ) , [ 'asc' , 'desc' ] ) ) { $ this -> direction = strtolower ( $ dir ) ; } return $ this ; }
Set default sort direction.

@param string $dir

@return $this
Set default sort direction .