_hasReason = (bool) $value; return $this; } public function hasReason() { return $this->_hasReason; } public function setHasFoundUs($value) { $this->_hasFoundUs = (bool) $value; return $this; } public function hasFoundUs() { return $this->_hasFoundUs; } public function getReasonTitle($reasonId) { $select = $this->_db->select(); $select->from($this->_getPair('DContactReason'), 'title'); $select->where('`DContactReason`.`id` = ?', (string) $reasonId, Qs_Db::INT_TYPE); $select->limit(1); return $this->_db->fetchOne($select); } public function getFoundUsTitle($id) { $select = $this->_db->select(); $select->from($this->_getPair('DContactFound'), 'title'); $select->where('`DContactFound`.`id` = ?', $id, Qs_Db::INT_TYPE); $select->limit(1); return $this->_db->fetchOne($select); } public function getListSelect() { if (null === $this->_select) { parent::getListSelect(); $this->_select->joinLeft( $this->_getPair('DContactReason'), '`DContactReason`.`id` = `' . $this->_tableAlias . '`.`idReason`', '' ); $this->_select->joinLeft( $this->_getPair('DContactFound'), '`DContactFound`.`id` = `' . $this->_tableAlias . '`.`idFoundUs`', '' ); } return $this->_select; } }