コード例 #1
0
ファイル: Column.php プロジェクト: michaeljennings/carpenter
 /**
  * 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;
 }
コード例 #2
0
ファイル: Table.php プロジェクト: michaeljennings/carpenter
 /**
  * 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';
         }
     }
 }