2 namespace wcf\system\importer
;
3 use wcf\data\label\LabelEditor
;
9 * @copyright 2001-2016 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package com.woltlab.wcf
12 * @subpackage system.importer
13 * @category Community Framework
15 class LabelImporter
extends AbstractImporter
{
19 protected $className = 'wcf\data\label\Label';
24 public function import($oldID, array $data, array $additionalData = []) {
25 $data['groupID'] = ImportHandler
::getInstance()->getNewID('com.woltlab.wcf.label.group', $data['groupID']);
26 if (!$data['groupID']) return 0;
28 $label = LabelEditor
::create($data);
30 ImportHandler
::getInstance()->saveNewID('com.woltlab.wcf.label', $oldID, $label->labelID
);
32 return $label->labelID
;