/** * 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'); } } }
/** * Clear the sort keys from the session * * @param string $key * @return bool */ protected function clearSession($key) { $this->session->forget($this->config['session']['key'] . '.' . $key . '.sort'); $this->session->forget($this->config['session']['key'] . '.' . $key . '.dir'); return true; }