You are here

protected function AcquiaLiftReportBase::loadConfidenceData in Acquia Lift Connector 7

Loads the agent confidence raw reporting data.

Parameters

$report_data: The current reporting array by reference.

$options: (Optional) An array of options to pass to the report source.

Return value

array The updated reporting data for chaining purposes. Note that the reporting data is updated by reference as well.

3 calls to AcquiaLiftReportBase::loadConfidenceData()
AcquiaLiftReport::loadReportData in plugins/agent_types/AcquiaLiftAgent.inc
Loads all of the data necessary to generate the reports for the agent.
AcquiaLiftReport::renderStatsForOptionSet in plugins/agent_types/AcquiaLiftAgent.inc
Implements PersonalizeAgentReportInterface::renderStatsForOptionSet().
AcquiaLiftReportBase::loadConversionReportHelper in plugins/agent_types/AcquiaLiftAgent.inc
Handles all of the logic to load and extract a conversion report.

File

plugins/agent_types/AcquiaLiftAgent.inc, line 1436
Provides an agent type for Acquia Lift

Class

AcquiaLiftReportBase
Base class providing report data loading functionality common to all Acquia Lift Reports.

Code

protected function loadConfidenceData(&$report_data, $options = array()) {
  $report_name = $this
    ->getConfidenceReportRawName($options);

  // Check and see if it is already loaded.
  if (isset($report_data['raw'][$report_name])) {
    return $report_data;
  }
  try {
    $defaults = array(
      'features' => 'all',
      'confidence-measure' => $report_data['confidence_measure'],
    );
    $options = array_merge($defaults, $options);
    $report_data['raw'][$report_name] = $this->reportDataSrc
      ->getConfidenceReport($report_data['machine_name'], $report_data['date_from'], $report_data['date_to'], $report_data['decision_name'], $options);
  } catch (Exception $e) {
    $report_data['raw'][$report_name]['error'] = $e
      ->getMessage();
  }
  return $report_data;
}