protected function initializeChart(PeriodInterface $period, $intStart, $intStop) { $arrSession = \Session::getInstance()->get('iso_reports'); $intConfig = (int) $arrSession[$this->name]['iso_config']; $intStart = strtotime('first day of this month', $intStart); $arrData = array(); $arrCurrencies = \Database::getInstance()->execute("\n SELECT DISTINCT currency FROM tl_iso_config WHERE currency!=''\n " . $this->getConfigProcedure() . "\n " . ($intConfig > 0 ? ' AND id=' . $intConfig : '') . "\n ")->fetchEach('currency'); foreach ($arrCurrencies as $currency) { $arrData[$currency . '_Members']['label'] = $currency . $GLOBALS['TL_LANG']['ISO_REPORT']['members_chart_toggle_suffix']; $arrData[$currency . '_Members']['className'] = '.' . strtolower($currency) . '_M'; $arrData[$currency . '_Guests']['label'] = $currency . $GLOBALS['TL_LANG']['ISO_REPORT']['guests_chart_toggle_suffix']; $arrData[$currency . '_Guests']['className'] = '.' . strtolower($currency) . '_G'; } while ($intStart <= $intStop) { foreach ($arrCurrencies as $currency) { $arrData[$currency . '_Members']['data'][$period->getKey($intStart)]['x'] = $intStart; $arrData[$currency . '_Members']['data'][$period->getKey($intStart)]['y'] = 0; $arrData[$currency . '_Guests']['data'][$period->getKey($intStart)]['x'] = $intStart; $arrData[$currency . '_Guests']['data'][$period->getKey($intStart)]['y'] = 0; } $intStart = $period->getNext($intStart); } return $arrData; }