function __construct(&$formValues) { parent::__construct($formValues); require_once 'CRM/Core/BAO/CustomGroup.php'; $this->_groupTree = CRM_Core_BAO_CustomGroup::getTree("'Contact', 'Individual', 'Organization', 'Household'", CRM_Core_DAO::$_nullObject, NULL, -1); $this->_columns = array(ts('Contact Id') => 'contact_id', ts('Contact Type') => 'contact_type', ts('Name') => 'sort_name'); $this->_customGroupIDs = CRM_Utils_Array::value('custom_group', $formValues); if (!empty($this->_customGroupIDs)) { $this->addColumns(); } }
function __construct(&$formValues) { parent::__construct($formValues); $this->normalize(); $this->_columns = array(ts('') => 'contact_type', ts('') => 'contact_sub_type', ts('Name') => 'sort_name', ts('Address') => 'street_address', ts('City') => 'city', ts('State') => 'state_province', ts('Postal') => 'postal_code', ts('Country') => 'country', ts('Email') => 'email', ts('Phone') => 'phone'); $params =& CRM_Contact_BAO_Query::convertFormValues($this->_formValues); $returnProperties = array(); foreach ($this->_columns as $name => $field) { $returnProperties[$field] = 1; } $this->_query = new CRM_Contact_BAO_Query($params, $returnProperties, NULL, FALSE, FALSE, 1, FALSE, FALSE); }