You are here

protected function AcquiaLiftReportBase::loadTargetingData in Acquia Lift Connector 7

Loads the agent targeting raw reporting data.

Parameters

$report_data: The current reporting array by reference.

Return value

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

1 call to AcquiaLiftReportBase::loadTargetingData()
AcquiaLiftReport::loadReportData in plugins/agent_types/AcquiaLiftAgent.inc
Loads all of the data necessary to generate the reports for the agent.

File

plugins/agent_types/AcquiaLiftAgent.inc, line 1471
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 loadTargetingData(&$report_data) {

  // Check and see if it is already loaded.
  if (isset($report_data['raw']['targeting'])) {
    return $report_data;
  }
  try {
    $report_data['raw']['targeting'] = $this->reportDataSrc
      ->getTargetingImpactReport($report_data['machine_name'], $report_data['date_from'], $report_data['date_to'], $report_data['decision_name']);
  } catch (Exception $e) {
    $report_data['raw']['confidence']['error'] = $e
      ->getMessage();
  }
  return $report_data;
}