_existsYears) { $select = $this->_db->select(); $select->from($this->_getPair($this->_tableAlias), 'DISTINCT (year)'); $select->order('year DESC'); $this->_existsYears = $this->_db->fetchCol($select); } return $this->_existsYears; } public function getList() { $list = parent::getList(); if (!empty($list)) { $listSorted = array('chapter' => null, 'national' => null); foreach ($list as $item) { $listSorted[$item['class']][] = $item; } $list = $listSorted; } return $list; } protected function _getFromColumns() { $columns = parent::_getFromColumns(); $columns['name'] = $this->_getNameFieldSubSelect(); $columns['typeName'] = $this->_getTypeFieldSubSelect(); return $columns; } }