2 namespace wcf\system\importer
;
3 use wcf\data\conversation\label\ConversationLabel
;
4 use wcf\data\conversation\label\ConversationLabelAction
;
7 * Imports conversation labels.
10 * @copyright 2001-2019 WoltLab GmbH
11 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12 * @package WoltLabSuite\Core\System\Importer
14 class ConversationLabelImporter
extends AbstractImporter
{
18 protected $className = ConversationLabel
::class;
23 public function import($oldID, array $data, array $additionalData = []) {
24 $data['userID'] = ImportHandler
::getInstance()->getNewID('com.woltlab.wcf.user', $data['userID']);
25 if (!$data['userID']) return 0;
27 $action = new ConversationLabelAction([], 'create', [
30 $returnValues = $action->executeAction();
31 $newID = $returnValues['returnValues']->labelID
;
33 ImportHandler
::getInstance()->saveNewID('com.woltlab.wcf.conversation.label', $oldID, $newID);