public function &convertFormValues(&$formValues) { return CRM_Core_BAO_Mapping::formattedFields($formValues); }
/** * Given a saved search compute the clause and the tables and store it for future use. */ public function buildClause() { $fv = unserialize($this->form_values); if ($this->mapping_id) { $params = CRM_Core_BAO_Mapping::formattedFields($fv); } else { $params = CRM_Contact_BAO_Query::convertFormValues($fv); } if (!empty($params)) { $tables = $whereTables = array(); $this->where_clause = CRM_Contact_BAO_Query::getWhereClause($params, NULL, $tables, $whereTables); if (!empty($tables)) { $this->select_tables = serialize($tables); } if (!empty($whereTables)) { $this->where_tables = serialize($whereTables); } } }
/** * given a saved search compute the clause and the tables * and store it for future use */ function buildClause() { $fv = unserialize($this->form_values); if ($this->mapping_id) { require_once 'CRM/Core/BAO/Mapping.php'; $params = CRM_Core_BAO_Mapping::formattedFields($fv); } else { require_once 'CRM/Contact/BAO/Query.php'; $params = CRM_Contact_BAO_Query::convertFormValues($fv); } if (!empty($params)) { $tables = $whereTables = array(); $this->where_clause = CRM_Contact_BAO_Query::getWhereClause($params, null, $tables, $whereTables); if (!empty($tables)) { $this->select_tables = serialize($tables); } if (!empty($whereTables)) { $this->where_tables = serialize($whereTables); } } return; }