contentful-migration
Version:
Migration tooling for contentful
26 lines • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EditorLayoutCreateFieldGroupAction = void 0;
const action_1 = require("../action");
class EditorLayoutCreateFieldGroupAction extends action_1.EntityAction {
constructor(contentTypeId, fieldGroupId, parentFieldGroupId) {
super();
this.contentTypeId = contentTypeId;
this.fieldGroupId = fieldGroupId;
this.parentFieldGroupId = parentFieldGroupId;
}
getEntityType() {
return action_1.EntityType.EditorInterface;
}
getEntityId() {
return this.contentTypeId;
}
async applyTo(editorInterfaces) {
await editorInterfaces.createEditorLayoutFieldGroup(this.fieldGroupId, this.parentFieldGroupId);
if (!this.parentFieldGroupId) {
await editorInterfaces.createTabGroupControl(this.fieldGroupId);
}
}
}
exports.EditorLayoutCreateFieldGroupAction = EditorLayoutCreateFieldGroupAction;
//# sourceMappingURL=editor-layout-create-field-group.js.map