protected function initializeData(PeriodInterface $period, $intStart, $intStop) { $arrData = array('rows' => array()); $arrData['header'] = array(array('value' => &$GLOBALS['TL_LANG']['ISO_REPORT']['period'], 'header' => true), array('value' => &$GLOBALS['TL_LANG']['ISO_REPORT']['orders#'], 'attributes' => ' style="text-align:right"'), array('value' => &$GLOBALS['TL_LANG']['ISO_REPORT']['products#'], 'attributes' => ' style="text-align:right"'), array('value' => &$GLOBALS['TL_LANG']['ISO_REPORT']['items#'], 'attributes' => ' style="text-align:right"'), array('value' => &$GLOBALS['TL_LANG']['ISO_REPORT']['sales#'], 'attributes' => ' style="text-align:right"')); $arrData['footer'] = array(array('value' => $GLOBALS['TL_LANG']['ISO_REPORT']['sums']), array('value' => 0, 'attributes' => ' style="text-align:right"'), array('value' => 0, 'attributes' => ' style="text-align:right"'), array('value' => 0, 'attributes' => ' style="text-align:right"'), array('value' => array(), 'attributes' => ' style="text-align:right"')); while ($intStart <= $intStop) { $arrData['rows'][$period->getKey($intStart)] = array('columns' => array(array('value' => $period->format($intStart)), array('value' => 0, 'attributes' => ' style="text-align:right"'), array('value' => 0, 'attributes' => ' style="text-align:right"'), array('value' => 0, 'attributes' => ' style="text-align:right"'), array('value' => 0, 'attributes' => ' style="text-align:right"'))); $intStart = $period->getNext($intStart); } RowClass::withKey('class')->addEvenOdd()->applyTo($arrData['rows']); return $arrData; }
protected function getHeader(PeriodInterface $period, $intStart, $intColumns) { $arrHeader = array(); $arrHeader[] = array('value' => 'Produkt'); for ($i = 0; $i < $intColumns; $i++) { $arrHeader[] = array('value' => $period->format($intStart)); $intStart = $period->getNext($intStart); } $arrHeader[] = array('value' => 'Total'); return $arrHeader; }