setExportMode($exportMode); $this->setQueryMode(); } /** * @return int */ public function getQueryMode() { return $this->queryMode; } /** * Set the query mode based on the export mode. */ public function setQueryMode() { switch ($this->getExportMode()) { case CRM_Export_Form_Select::CONTRIBUTE_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_CONTRIBUTE; break; case CRM_Export_Form_Select::EVENT_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_EVENT; break; case CRM_Export_Form_Select::MEMBER_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_MEMBER; break; case CRM_Export_Form_Select::PLEDGE_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_PLEDGE; break; case CRM_Export_Form_Select::CASE_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_CASE; break; case CRM_Export_Form_Select::GRANT_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_GRANT; break; case CRM_Export_Form_Select::ACTIVITY_EXPORT: $this->queryMode = CRM_Contact_BAO_Query::MODE_ACTIVITY; break; default: $this->queryMode = CRM_Contact_BAO_Query::MODE_CONTACTS; } } /** * @return int */ public function getExportMode() { return $this->exportMode; } /** * @param int $exportMode */ public function setExportMode($exportMode) { $this->exportMode = $exportMode; } }