UNPKG

woltlab-compiler

Version:

A compiler for WoltLab-Package Archives and WoltLab-Package Components

30 lines 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const XMLEditor_1 = require("../Serialization/XMLEditor"); const ImportFileCompiler_1 = require("./ImportFileCompiler"); /** * Provides the functionality to compile files with an import- and a delete-section. */ class ObjectDeletionFileCompiler extends ImportFileCompiler_1.ImportFileCompiler { /** * Initializes a new instance of the `DeleteInstructionFileCompiler<T, TObject>` class. * * @param item * The item to compile. */ constructor(item) { super(item); } /** * Serializes the delete-section of the document. */ CreateDelete() { let editor = new XMLEditor_1.XMLEditor(super.CreateDelete()); for (let objectToDelete of this.Item.ObjectsToDelete) { editor.Add(this.CreateDeleteObject(objectToDelete)); } return editor.Element; } } exports.ObjectDeletionFileCompiler = ObjectDeletionFileCompiler; //# sourceMappingURL=ObjectDeletionFileCompiler.js.map