Swat/SwatTableViewOrderableColumn.php
protected function getNextDirection()
    {
        switch ($this->direction) {
            case self::ORDER_BY_DIR_NONE:
                return self::ORDER_BY_DIR_ASCENDING;

            case self::ORDER_BY_DIR_ASCENDING:
                return self::ORDER_BY_DIR_DESCENDING;

            case self::ORDER_BY_DIR_DESCENDING:
            default:
                if ($this->view->default_orderby_column === null) {
                    // tri-state
                    return self::ORDER_BY_DIR_NONE;
                }

                // bi-state
                return self::ORDER_BY_DIR_ASCENDING;
        }
    }
protected function getNextDirection()
    {
        switch ($this->direction) {
            case self::ORDER_BY_DIR_NONE:
                return self::ORDER_BY_DIR_ASCENDING;

            case self::ORDER_BY_DIR_ASCENDING:
                return self::ORDER_BY_DIR_DESCENDING;

            case self::ORDER_BY_DIR_DESCENDING:
            default:
                if ($this->view->default_orderby_column === null) {
                    // tri-state
                    return self::ORDER_BY_DIR_NONE;
                }

                // bi-state
                return self::ORDER_BY_DIR_ASCENDING;
        }
    }
protected function getNextDirection ( ) { switch ( $ this -> direction ) { case self :: ORDER_BY_DIR_NONE : return self :: ORDER_BY_DIR_ASCENDING ; case self :: ORDER_BY_DIR_ASCENDING : return self :: ORDER_BY_DIR_DESCENDING ; case self :: ORDER_BY_DIR_DESCENDING : default : if ( $ this -> view -> default_orderby_column === null ) { // tri-state return self :: ORDER_BY_DIR_NONE ; } // bi-state return self :: ORDER_BY_DIR_ASCENDING ; } }
Gets the next direction or ordering in the rotation

As a user clicks on the comun headers the direction of ordering changes
from NONE => ASCSENDING => DESCENDING => NONE in a loop.

@return integer the next direction of ordering for this column.
Gets the next direction or ordering in the rotation