/** * add body rows * * @param Tinebase_Record_RecordSet $records */ public function processIteration($_records) { $this->_resolveRecords($_records); // add record rows $i = 0; foreach ($_records as $record) { $row = $this->_activeTable->appendRow(); foreach ($this->_config->columns->column as $field) { //$altStyle = 'ceAlternate'; // get type and value for cell $cellType = $this->_getCellType($field->type); $cellValue = $this->_getCellValue($field, $record, $cellType); // create cell with type and value and add style $cell = $row->appendCell($cellValue, $cellType); // add formula if ($field->formula) { $cell->setFormula($field->formula); } /* if ($i % 2 == 1) { $cell->setStyle($altStyle); } */ //if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . print_r($field->toArray(), true)); } $i++; } }
/** * add single body row * * @param $record */ public function processRecord($record, $idx) { $row = $this->_activeTable->appendRow(); foreach ($this->_config->columns->column as $field) { // get type and value for cell $cellType = $this->_getCellType($field->type); $cellValue = $this->_getCellValue($field, $record, $cellType); // create cell with type and value and add style $cell = $row->appendCell($cellValue, $cellType); if ($field->columnStyle) { $cell->setStyle((string) $field->columnStyle); } // add formula if ($field->formula) { $cell->setFormula($field->formula); } } }