_db->select(); $select->from($this->pair); $select->where('`type` = ?', $type); $select->where('`showInMenu` = ?', 'y'); $select->where('`enabled` = ?', 'y'); $select->order('sorter'); return $this->_db->fetchAll($select); } protected function _filterWhere(Zend_Db_Select $select) { parent::_filterWhere($select); $this->_filterEnabled($select); return $this; } protected function _filterEnabled(Zend_Db_Select $select) { $select->where('`' . $this->_tableAlias . '`.`enabled` = "y"'); return $this; } protected function _joinFromDb(Zend_Db_Select $select) { parent::_joinFromDb($select); $this->_filterEnabled($select); return $this; } }