コード例 #1
0
 /**
  * returns the column headers as an array of tuples:
  * (name, sortName (key to the sort array))
  *
  * @param string $action the action being performed
  * @param enum   $output what should the result set include (web/email/csv)
  *
  * @return array the column headers that need to be displayed
  * @access public
  */
 function &getColumnHeaders($action = null, $output = null)
 {
     if ($output == CRM_CORE_SELECTOR_CONTROLLER_EXPORT || $output == CRM_CORE_SELECTOR_CONTROLLER_SCREEN) {
         $csvHeaders = array(ts('Contact Id'), ts('Contact Type'));
         foreach (CRM_Contact_Selector::_getColumnHeaders() as $column) {
             if (array_key_exists('name', $column)) {
                 $csvHeaders[] = $column['name'];
             }
         }
         return $csvHeaders;
     } else {
         return CRM_Contact_Selector::_getColumnHeaders();
     }
 }