Add the new variable `FileProcessorFormField::$bigPreview` with getter and setter.
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / importer / LabelImporter.class.php
1 <?php
2
3 namespace wcf\system\importer;
4
5 use wcf\data\label\Label;
6 use wcf\data\label\LabelEditor;
7
8 /**
9 * Imports labels.
10 *
11 * @author Marcel Werk
12 * @copyright 2001-2019 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 */
15 class LabelImporter extends AbstractImporter
16 {
17 /**
18 * @inheritDoc
19 */
20 protected $className = Label::class;
21
22 /**
23 * @inheritDoc
24 */
25 public function import($oldID, array $data, array $additionalData = [])
26 {
27 $data['groupID'] = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.label.group', $data['groupID']);
28 if (!$data['groupID']) {
29 return 0;
30 }
31
32 $label = LabelEditor::create($data);
33
34 ImportHandler::getInstance()->saveNewID('com.woltlab.wcf.label', $oldID, $label->labelID);
35
36 return $label->labelID;
37 }
38 }