egroupware_official/infolog/inc/class.infolog_wizard_export_csv.inc.php

35 lines
1.1 KiB
PHP
Raw Normal View History

2010-11-08 18:19:22 +01:00
<?php
/**
2016-04-30 19:05:23 +02:00
* EGroupware - Wizard for Infolog CSV export
2010-11-08 18:19:22 +01:00
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package infolog
* @subpackage importexport
* @link http://www.egroupware.org
* @author Nathan Gray
* @version $Id$
*/
2016-04-30 19:05:23 +02:00
use EGroupware\Api;
2010-11-08 18:19:22 +01:00
class infolog_wizard_export_csv extends importexport_wizard_basic_export_csv
{
public function __construct() {
parent::__construct();
// Field mapping
2012-04-18 19:48:10 +02:00
$bo = new infolog_tracking(new infolog_bo());
$this->export_fields = array('info_id' => 'Infolog ID', 'pm_id' => 'Project ID', 'project' => 'Project Name') + $bo->field2label;
// Add in created date, in the appropriate place
$first = array_splice($this->export_fields, 0, array_search('info_datemodified',array_keys($this->export_fields)));
$this->export_fields = array_merge($first, array('info_created'=>'creation'), $this->export_fields);
2010-11-08 18:19:22 +01:00
// Custom fields
unset($this->export_fields['custom']); // Heading, not a real field
2016-04-30 19:05:23 +02:00
$custom = Api\Storage\Customfields::get('infolog', true);
2010-11-08 18:19:22 +01:00
foreach($custom as $name => $data) {
$this->export_fields['#'.$name] = $data['label'];
}
}
}