| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
}
/**
+ * Alter display of rows.
+ *
+ * Iterate through the rows retrieved via SQL and make changes for display purposes,
+ * such as rendering contacts as links.
+ *
* @param array $rows
+ * Rows generated by SQL, with an array for each row.
*/
public function alterDisplay(&$rows) {
parent::alterDisplay($rows);
// are grouped together across price sets but there may be a separate need to group
// by id so that entries in one price set are distinct from others. Not quite sure what
// to call the distinction for end users benefit
- array(
- 'price_field_value_label' => array(
- 'title' => ts('Price Field Value Label'),
- 'name' => 'label',
- ),
+ array(
+ 'price_field_value_label' => array(
+ 'title' => ts('Price Field Value Label'),
+ 'name' => 'label',
),
+ ),
),
);
}
'filters' => array(
'id' => array(
'title' => ts('Contact ID'),
- )
- ,
+ ),
'sort_name' => array(
'title' => ts('Contact Name'),
),
}
/**
- * Get address columns to add to array
+ * Get address columns to add to array.
*
* @param array $options
* Options for the report.
}
/**
- * Get Information about advertised Joins
+ * Get Information about advertised Joins.
*
* @return array
*/
}
/**
- * Define join from line item table to participant table
+ * Define join from line item table to participant table.
*/
public function joinParticipantFromLineItem() {
$this->_from .= " LEFT JOIN civicrm_participant {$this->_aliases['civicrm_participant']}
}
/**
- * Define join from Participant to Contribution table
+ * Define join from Participant to Contribution table.
*/
public function joinContributionFromParticipant() {
$this->_from .= " LEFT JOIN civicrm_participant_payment pp
}
/**
- * Define join from Membership to Contribution table
+ * Define join from Membership to Contribution table.
*/
public function joinContributionFromMembership() {
$this->_from .= " LEFT JOIN civicrm_membership_payment pp
}
/**
- * Retrieve text for financial type from pseudoconstant
+ * Retrieve text for financial type from pseudoconstant.
*
* @param $value
* @param array $row
*/
public function alterNickName($value, &$row) {
if (empty($row['civicrm_contact_id'])) {
- return;
+ return NULL;
}
$contactID = $row['civicrm_contact_id'];
return "<div id=contact-{$contactID} class='crm-entity'>
}
/**
- * Retrieve text for contribution type from pseudoconstant
+ * Retrieve text for contribution type from pseudoconstant.
*
* @param $value
* @param array $row
}
/**
- * Retrieve text for contribution status from pseudoconstant
+ * Retrieve text for contribution status from pseudoconstant.
*
* @param $value
* @param array $row
}
/**
- * Retrieve text for payment instrument from pseudoconstant
+ * Retrieve text for payment instrument from pseudoconstant.
*
* @param $value
* @param array $row
*/
public function alterParticipantStatus($value) {
if (empty($value)) {
- return;
+ return NULL;
}
return CRM_Event_PseudoConstant::participantStatus($value, FALSE, 'label');
}
*/
public function alterParticipantRole($value) {
if (empty($value)) {
- return;
+ return NULL;
}
$roles = explode(CRM_Core_DAO::VALUE_SEPARATOR, $value);
$value = array();
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
return $paymentInstruments[$value];
}
+
}