/** * Check if the column is being sorted. * * @return bool */ public function isActive() { if (!isset($this->active)) { $this->active = $this->session->get($this->config['session']['key'] . '.' . $this->key . '.sort') == $this->column; } return $this->active; }
/** * Check if a column is being sorted, if so then set the sort column in the session * and check if the it is in descending order. */ protected function setSortParameters() { if ($this->isSorted()) { $this->sortBy = $this->session->get($this->config['session']['key'] . '.' . $this->key . '.sort'); if ($this->isDescending()) { $this->sortDir = 'desc'; } } }