Example #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
  */
 public function &getColumnHeaders($action = NULL, $output = NULL)
 {
     if (!isset(self::$_columnHeaders)) {
         self::$_columnHeaders = array(array('name' => ts('Pledged'), 'sort' => 'pledge_amount', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Total Paid'), 'sort' => 'pledge_total_paid', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Balance')), array('name' => ts('Pledged For'), 'sort' => 'pledge_financial_type', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Pledge Made'), 'sort' => 'pledge_create_date', 'direction' => CRM_Utils_Sort::DESCENDING), array('name' => ts('Next Pay Date'), 'sort' => 'pledge_next_pay_date', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Next Amount'), 'sort' => 'pledge_next_pay_amount', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Status'), 'sort' => 'pledge_status', 'direction' => CRM_Utils_Sort::DONTCARE), array('desc' => ts('Actions')));
         if (!$this->_single) {
             $pre = array(array('desc' => ts('Contact Id')), array('name' => ts('Name'), 'sort' => 'sort_name', 'direction' => CRM_Utils_Sort::DONTCARE));
             self::$_columnHeaders = array_merge($pre, self::$_columnHeaders);
         }
     }
     return self::$_columnHeaders;
 }