An Array of application references which will be automatically updated when the collection content changes
Record the set of document ids where the Document was not initialized because of invalid source data
Static
documentReturn a reference to the SidebarDirectory application for this WorldCollection.
The Collection class name
Static
instanceReturn a reference to the singleton instance of this WorldCollection, or null if it has not yet been created.
Static
registeredReturn an array of currently registered sheet classes for this Document type.
Import a Document from a Compendium collection, adding it to the current World.
The CompendiumCollection instance from which to import
The ID of the compendium entry to import
Optional
updateData: object = {}Optional additional data used to modify the imported Document before it is created
Optional
options: object = {}Optional arguments passed to the WorldCollection#fromCompendium and Document.create methods
The imported Document instance
Apply data transformations when importing a Document from a Compendium pack
The source Document, or a plain data object
Optional
options: FromCompendiumOptions = {}Additional options which modify how the document is imported
The processed data ready for world Document creation
Obtain a temporary Document instance for a document id which currently has invalid source data.
A document ID with invalid source data.
Optional
options: { Additional options to configure retrieval.
Throw an Error if the requested ID is not in the set of invalid IDs for this collection.
An in-memory instance for the invalid Document
If strict is true and the requested ID is not in the set of invalid IDs for this collection.
Get an element from the DocumentCollection by its ID.
The ID of the Document to retrieve.
Optional
options: { Additional options to configure retrieval.
Throw an Error if the requested Document does not exist.
Allow retrieving an invalid Document.
If strict is true and the Document cannot be found.
Find all Documents which match a given search term using a full-text search against their indexed HTML fields and their name. If filters are provided, results are filtered to only those that match the provided values.
An object configuring the search
A case-insensitive search string
An array of filters to apply
An array of document IDs to exclude from search results
Update all objects in this DocumentCollection with a provided transformation. Conditionally filter to only apply to Entities which match a certain condition.
An object of data or function to apply to all matched objects
A function which tests whether to target each object
Optional
options: object = {}Additional options passed to Document.updateDocuments
An array of updated data once the operation is complete
Internal
Follow-up actions to take when a database operation modifies Documents in this DocumentCollection.
The database action performed
The array of modified Documents
The result of the database operation
Database operation details
The User who performed the operation
Static
registerRegister a Document sheet class as a candidate which can be used to display Documents of a given type. See DocumentSheetConfig.registerSheet for details.
Rest
...args: any[]Arguments forwarded to the DocumentSheetConfig.registerSheet method
Actors.registerSheet("dnd5e", ActorSheet5eCharacter, { types: ["character], makeDefault: true });
Static
unregisterUnregister a Document sheet class, removing it from the list of available sheet Applications to use. See DocumentSheetConfig.unregisterSheet for detauls.
Rest
...args: any[]Arguments forwarded to the DocumentSheetConfig.unregisterSheet method
Actors.unregisterSheet("core", ActorSheet);
Static
getGet the searchable fields for a given document or index, based on its data model
The document type name
Optional
documentSubtype: string = ""The document subtype name
Optional
isEmbedded: boolean = falseWhether the document is an embedded object
The dot-delimited property paths of searchable fields
The collection of Cards documents which exist within the active World. This Collection is accessible within the Game object as game.cards.
See
Cards The Cards document