_db->select(); $select->from($this->_getPair(), ['year']); $select->distinct(); $select->order('year'); $min = $this->_db->fetchOne($select); return range(idate('Y'), $min); } public function getEventByYear($year) { $select = $this->_db->select(); $select->from($this->_getPair('Event', 'e'), ['id', 'title', 'postDescription']); $select->where('enabled = ?', 'y'); $select->where('showAs = ?', Entity::ANNUAL_MEETING); $select->where('YEAR(startDate) = ?', $year, Qs_Db::INT_TYPE); $select->order('startDate desc'); $select->limit(1); $event = $this->_db->fetchRow($select); $this->_arrayParseTag2Url($event, ['postDescription']); return $event; } protected function _applySelectOptions(Zend_Db_Select $select, array $options = []) { $select->order('sorter'); return $this; } }