Files
Foundry-VTT-Docker/resources/app/client/data/collections/compendium-folders.js

38 lines
848 B
JavaScript
Raw Normal View History

2025-01-04 00:34:03 +01:00
/**
* A Collection of Folder documents within a Compendium pack.
*/
class CompendiumFolderCollection extends DocumentCollection {
constructor(pack, data=[]) {
super(data);
this.pack = pack;
}
/**
* The CompendiumPack instance which contains this CompendiumFolderCollection
* @type {CompendiumPack}
*/
pack;
/* -------------------------------------------- */
/** @inheritdoc */
get documentName() {
return "Folder";
}
/* -------------------------------------------- */
/** @override */
render(force, options) {
this.pack.render(force, options);
}
/* -------------------------------------------- */
/** @inheritdoc */
async updateAll(transformation, condition=null, options={}) {
options.pack = this.collection;
return super.updateAll(transformation, condition, options);
}
}