Prior to this change, the strings 'Tabular', 'Bar Chart' and 'Pie Chart' were hardcoded.
*/
public $optimisedForOnlyFullGroupBy = TRUE;
+ /**
+ * Determines which chart types are supported for this report
+ * @var string[]
+ */
+ protected $_charts = [];
+
/**
* Get the number of rows to show
* @return int
*/
class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form {
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
/**
* This is the report that links will lead to.
*
// If we have a campaign, build out the relevant elements
$this->addCampaignFields('civicrm_contribution');
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
parent::__construct();
$current_year = $this->_params['yid_value'];
$previous_year = $current_year - 1;
$interval[$previous_year] = $previous_year;
- $interval['life_time'] = 'Life Time';
+ $interval['life_time'] = ts('Life Time');
foreach ($rows as $key => $row) {
// The final row contains the totals so we don't need to include it here.
protected $_emailFieldCredit = FALSE;
protected $_phoneField = FALSE;
protected $_phoneFieldCredit = FALSE;
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
protected $_customGroupExtends = [
'Contact',
// If we have a campaign, build out the relevant elements
$this->addCampaignFields('civicrm_contribution');
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
*/
class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form {
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
protected $_customGroupExtends = ['Contribution', 'Contact', 'Individual'];
protected $_customGroupGroupBy = TRUE;
$this->addCampaignFields('civicrm_contribution', TRUE);
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_tagFilter = TRUE;
$this->_groupFilter = TRUE;
$this->_currencyColumn = 'civicrm_contribution_currency';
*/
class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form {
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
protected $_customGroupExtends = [
'Contact',
'Individual',
// If we have a campaign, build out the relevant elements
$this->addCampaignFields('civicrm_contribution');
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
parent::__construct();
public $_drilldownReport = ['contribute/detail' => 'Link to Detail Report'];
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
/**
*/
public function __construct() {
],
];
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
$this->_currencyColumn = 'civicrm_contribution_currency';
protected $_summary = NULL;
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
protected $_add2groupSupported = FALSE;
protected $_customGroupExtends = [
],
],
];
+
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
parent::__construct();
}
protected $_summary = NULL;
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
protected $_add2groupSupported = FALSE;
protected $_customGroupExtends = [
],
];
$this->_currencyColumn = 'civicrm_participant_fee_currency';
+
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
parent::__construct();
}
'Organization',
];
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
/**
* This report has not been optimised for group filtering.
*
'grouping' => 'contact-fields',
];
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
parent::__construct();
'Organization',
];
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
/**
* This report has not been optimised for group filtering.
*
'grouping' => 'mailing-fields',
];
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
parent::__construct();
'Organization',
];
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
/**
* This report has not been optimised for group filtering.
*
'grouping' => 'mailing-fields',
];
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
parent::__construct();
public $_drilldownReport = ['mailing/detail' => 'Link to Detail Report'];
- protected $_charts = [
- '' => 'Tabular',
- 'barchart' => 'Bar Chart',
- ];
-
/**
* Class constructor.
*/
];
// If we have campaigns enabled, add those elements to both the fields, filters.
$this->addCampaignFields('civicrm_mailing');
+
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ ];
+
parent::__construct();
}
class CRM_Report_Form_Member_Lapse extends CRM_Report_Form {
protected $_summary = NULL;
- protected $_charts = ['' => 'Tabular'];
protected $_customGroupExtends = [
'Membership',
];
protected $_summary = NULL;
protected $_interval = NULL;
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
+
protected $_add2groupSupported = FALSE;
protected $_customGroupExtends = ['Membership'];
// If we have campaigns enabled, add those elements to both the fields, filters and group by
$this->addCampaignFields('civicrm_membership', TRUE);
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_currencyColumn = 'civicrm_contribution_currency';
parent::__construct();
protected $_summary = NULL;
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
-
/**
* Constructor function.
*/
],
],
];
+
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
parent::__construct();
}
* @copyright CiviCRM LLC https://civicrm.org/licensing
*/
class CRM_Report_Form_Pledge_Pbnp extends CRM_Report_Form {
- protected $_charts = [
- '' => 'Tabular',
- 'barChart' => 'Bar Chart',
- 'pieChart' => 'Pie Chart',
- ];
public $_drilldownReport = ['pledge/summary' => 'Link to Detail Report'];
protected $_customGroupExtends = [
// If we have a campaign, build out the relevant elements
$this->addCampaignFields('civicrm_pledge');
+ // Add charts support
+ $this->_charts = [
+ '' => ts('Tabular'),
+ 'barChart' => ts('Bar Chart'),
+ 'pieChart' => ts('Pie Chart'),
+ ];
+
$this->_groupFilter = TRUE;
$this->_tagFilter = TRUE;
$this->_currencyColumn = 'civicrm_pledge_currency';