header for additional columns can be set

This commit is contained in:
Uwe Steinmann 2016-04-22 12:57:39 +02:00
parent b4e2224c3e
commit 35d7a70ade

View File

@ -48,9 +48,15 @@ class SeedDMS_Download_Mgr {
function __construct($tmpdir = '') {
$this->tmpdir = $tmpdir;
$this->items = array();
$this->header = array('Dokumenten-Nr.', 'Dokumentenname', 'Dateiname', 'Status', 'Int. Version', 'Prüfer', 'Prüfdatum', 'Prüfkommentar', 'Prüfstatus', 'Freigeber', 'Freigabedatum', 'Freigabekommentar', 'Freigabestatus');
$this->extracols = array();
$this->extraheader = array();
}
public function addHeader($extraheader) { /* {{{ */
$this->extraheader = $extraheader;
} /* }}} */
public function addItem($item, $extracols) { /* {{{ */
$this->items[$item->getID()] = $item;
$this->extracols[$item->getID()] = $extracols;
@ -64,19 +70,10 @@ class SeedDMS_Download_Mgr {
$i = 1;
$col = 0;
$sheet->setCellValueByColumnAndRow($col++, $i, 'Dokumenten-Nr.');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Dokumentenname');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Dateiname');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Status');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Int. Version');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfer');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfdatum');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfkommentar');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Prüfstatus');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Freigeber');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabedatum');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabekommentar');
$sheet->setCellValueByColumnAndRow($col++, $i, 'Freigabestatus');
foreach($this->header as $h)
$sheet->setCellValueByColumnAndRow($col++, $i, $h);
foreach($this->extraheader as $h)
$sheet->setCellValueByColumnAndRow($col++, $i, $h);
$i++;
foreach($items as $item) {
$document = $item->getDocument();