_filterBought($select); return parent::_filter($select); } protected function _filterBought(Zend_Db_Select $select) { $select->where($this->_quoteField('bought') . ' = ?', 'y'); return $this; } public function getListSelect() { if (null !== $this->_select) { return $this->_select; } $select = parent::getListSelect(); $this->_joinEvent($select); $this->_joinStatus($select); return $select; } protected function _joinEvent(Zend_Db_Select $select) { $select->join( $this->_getPair('Event', 'e'), '`e`.`id` = `ea`.`eventId`', ['eventName' => 'title', 'eventStartDate' => 'startDate', 'eventAlias' => 'alias'] ); return $this; } protected function _joinStatus(Zend_Db_Select $select) { $select->join( $this->_getPair('EventAttendeeStatus', 'as'), '`as`.`id` = `ea`.`status`', ['statusTitle' => 'title'] ); return $this; } }