egroupware/timesheet/inc/class.timesheet_wizard_export_csv.inc.php

35 lines
872 B
PHP
Raw Normal View History

2011-01-26 00:55:57 +01:00
<?php
/**
* eGroupWare - Wizard for Timesheet CSV export
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package timesheet
* @subpackage importexport
* @link http://www.egroupware.org
* @author Nathan Gray
* @version $Id$
*/
use EGroupware\Api;
2011-01-26 00:55:57 +01:00
class timesheet_wizard_export_csv extends importexport_wizard_basic_export_csv
{
public function __construct() {
parent::__construct();
// Field mapping
$bo = new timesheet_bo();
2017-01-17 18:34:10 +01:00
$this->export_fields = array('ts_id' => 'Timesheet ID') + $bo->field2label + array(
'ts_created' => 'Created',
'ts_modified'=> 'Modified'
);
2011-01-26 00:55:57 +01:00
// Custom fields
unset($this->export_fields['customfields']);
$custom = Api\Storage\Customfields::get('timesheet', true);
2011-01-26 00:55:57 +01:00
foreach($custom as $name => $data) {
$this->export_fields['#'.$name] = $data['label'];
}
}
}