示例#1
0
 /**
  * Check if the column is being sorted in descending order.
  *
  * @return bool
  */
 public function isDescending()
 {
     if (!isset($this->descending)) {
         $this->descending = $this->session->has($this->config['session']['key'] . '.' . $this->key . '.dir');
     }
     return $this->descending;
 }
示例#2
0
 /**
  * Check if the user has ordered the table and which direction it is
  * ordered.
  */
 protected function setOrderValues()
 {
     if (isset($_GET['sort']) && isset($_GET['table']) && $_GET['table'] == urlencode($this->key)) {
         $this->session->put($this->config['session']['key'] . '.' . $this->key . '.sort', $_GET['sort']);
         if (isset($_GET['dir'])) {
             $this->session->put($this->config['session']['key'] . '.' . $this->key . '.dir', true);
         } else {
             $this->session->forget($this->config['session']['key'] . '.' . $this->key . '.dir');
         }
     }
 }