CodeExplorer prepareOverviewData example
return reset($turnoverItem);
},
$turnover->
getData());
$visitors =
array_map(function D
$visitorsItem) { return reset($visitorsItem);
},
$visitors->
getData());
$registrations =
array_map(function D
$registrationsItem) { return reset($registrationsItem);
},
$registrations->
getData());
$data =
array_merge_recursive($turnover,
$visitors);
$data =
array_merge_recursive($data,
$registrations);
$data =
$this->
prepareOverviewData($data);
krsort($data);
foreach ($data as $date => &
$row) { $row['date'
] =
strtotime($date);
if ($row['visits'
] != 0
) { $row['conversion'
] =
round($row['orderCount'
] /
$row['visits'
] * 100, 2
);
} else { $row['conversion'
] = 0;
} }