예제 #1
0
파일: Builder.php 프로젝트: hguru/224Civi
 public function &convertFormValues(&$formValues)
 {
     return CRM_Core_BAO_Mapping::formattedFields($formValues);
 }
예제 #2
0
 /**
  * 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);
         }
     }
 }
예제 #3
0
 /**
  * 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;
 }