/** * 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('Title'), 'sort' => 'booking_title', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Associated Contact'), 'sort' => 'booking_associated_contact', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Date Booking Made'), 'sort' => 'booking_event_date', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Start Date'), 'sort' => 'start_date', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('End Date'), 'sort' => 'end_date', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Price'), 'sort' => 'booking_total_amount', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Booking Status'), 'sort' => 'booking_status', 'direction' => CRM_Utils_Sort::DONTCARE), array('name' => ts('Payment Status'), 'sort' => 'booking_payment_status', 'direction' => CRM_Utils_Sort::DONTCARE), array('desc' => ts('Actions'))); if (!$this->_single) { $pre = array(array('desc' => ts('Contact Type')), array('name' => ts('Booking Contact'), 'sort' => 'sort_name', 'direction' => CRM_Utils_Sort::DONTCARE)); self::$_columnHeaders = array_merge($pre, self::$_columnHeaders); } } return self::$_columnHeaders; }