public static function ajax($activate = true)
    {
        if ($activate && !in_array('ajax', self::$modes)) {
            self::setMode('ajax');
        } else {
            self::unsetMode('ajax');
        }
    }
public static function ajax($activate = true)
    {
        if ($activate && !in_array('ajax', self::$modes)) {
            self::setMode('ajax');
        } else {
            self::unsetMode('ajax');
        }
    }
public static function ajax ( $ activate = true ) { if ( $ activate && ! in_array ( 'ajax' , self :: $ modes ) ) { self :: setMode ( 'ajax' ) ; } else { self :: unsetMode ( 'ajax' ) ; } }
Activates or deactivates the ajax mode.

@param boolean $activate turn it off or on.

@return void
Activates or deactivates the ajax mode .