3 namespace wcf\system\importer
;
5 use wcf\data\label\Label
;
6 use wcf\data\label\LabelEditor
;
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
15 class LabelImporter
extends AbstractImporter
20 protected $className = Label
::class;
25 public function import($oldID, array $data, array $additionalData = [])
27 $data['groupID'] = ImportHandler
::getInstance()->getNewID('com.woltlab.wcf.label.group', $data['groupID']);
28 if (!$data['groupID']) {
32 $label = LabelEditor
::create($data);
34 ImportHandler
::getInstance()->saveNewID('com.woltlab.wcf.label', $oldID, $label->labelID
);
36 return $label->labelID
;