/**
  * get colunmn headers for search selector
  *
  *
  * @return array $_columnHeaders
  * @access private
  */
 private static function &_getColumnHeaders()
 {
     if (!isset(self::$_columnHeaders)) {
         $addressOptions = CRM_Core_BAO_Setting::valueOptions(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'address_options', TRUE, NULL, TRUE);
         self::$_columnHeaders = array('contact_type' => array('desc' => ts('Contact Type')), 'sort_name' => array('name' => ts('Name'), 'sort' => 'sort_name', 'direction' => CRM_Utils_Sort::ASCENDING));
         $defaultAddress = array('street_address' => array('name' => ts('Address')), 'city' => array('name' => ts('City'), 'sort' => 'city', 'direction' => CRM_Utils_Sort::DONTCARE), 'state_province' => array('name' => ts('State'), 'sort' => 'state_province', 'direction' => CRM_Utils_Sort::DONTCARE), 'postal_code' => array('name' => ts('Postal'), 'sort' => 'postal_code', 'direction' => CRM_Utils_Sort::DONTCARE), 'country' => array('name' => ts('Country'), 'sort' => 'country', 'direction' => CRM_Utils_Sort::DONTCARE));
         foreach ($defaultAddress as $columnName => $column) {
             if (!empty($addressOptions[$columnName])) {
                 self::$_columnHeaders[$columnName] = $column;
             }
         }
         self::$_columnHeaders['email'] = array('name' => ts('Email'), 'sort' => 'email', 'direction' => CRM_Utils_Sort::DONTCARE);
         self::$_columnHeaders['phone'] = array('name' => ts('Phone'));
     }
     return self::$_columnHeaders;
 }
Exemple #2
0
 /**
  * get colunmn headers for search selector
  *
  *
  * @return array $_columnHeaders
  * @access private
  */
 private static function &_getColumnHeaders()
 {
     if (!isset(self::$_columnHeaders)) {
         self::$_columnHeaders = array(array('desc' => ts('Contact Type')), array('name' => ts('Name'), 'sort' => 'sort_name', 'direction' => CRM_Utils_Sort::ASCENDING), array('name' => ts('Address')), array('name' => ts('City'), 'sort' => 'city', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('State'), 'sort' => 'state_province', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Postal'), 'sort' => 'postal_code', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Country'), 'sort' => 'country', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Email'), 'sort' => 'email', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Phone')));
     }
     return self::$_columnHeaders;
 }