Optionaldata: any = {}Initial data used to construct the data object. The provided object will be owned by the constructed model instance and may be mutated.
Optionaloptions: DocumentConstructionContext = {}Context and data validation options which affects initial model construction.
The source data object for this DataModel instance. Once constructed, the source object is sealed such that no keys may be added nor removed.
Internal_Track whether the scene is the active view and which level is viewed
Internal_Track the viewed position of each scene (while in memory only, not persisted) When switching back to a previously viewed scene, we can automatically pan to the previous position.
Determine the canvas dimensions this Scene would occupy, if rendered
The grid instance.
The gridless version of the grid instance.
An immutable reverse-reference to a parent DataModel to which this model belongs.
Static Internal_A mapping of top-level scene properties to their corresponding properties on the child level.
Static Internal_The defined and cached Data Schema for all instances of this DataModel.
StaticLOCALIZATION_StaticmetadataDefault metadata which applies to each instance of this Document type.
AbstractcompendiumA reference to the Compendium Collection containing this Document, if any, and otherwise null.
A convenience getter for the Scene's first created Level. This should not be relied on in multi-level scenes to mean the first level by sort order.
The canonical identifier for this Document.
Is this document in a compendium?
Have the edges of this Scene been initialized already?
The property becomes true we moment Scene#initializeEdges is called.
The initial Level of the Scene. By default the first Level.
Is the current state of this DataModel invalid? The model is invalid if there is any unresolved failure.
Is this document embedded within a parent document?
A convenience accessor for whether the Scene is currently viewed
Define the data schema for this document instance.
Provide a thumbnail image path used to represent this document.
A Universally Unique Identifier (uuid) for this Document instance.
An array of validation failure instances which may have occurred when this instance was last validated.
StaticbaseThe base document definition that this document class extends from.
StaticcollectionThe named collection to which this Document belongs.
StaticdatabaseThe database backend used to execute operations and handle results.
StaticdefaultThe default grid defined by the system.
StaticdefaultThe gridless version of the default grid defined by the system.
StaticdocumentThe canonical name of this Document type, for example "Actor".
StatichasDoes this Document support additional subtypes?
StatichierarchyThe Embedded Document hierarchy for this Document.
StaticimplementationReturn a reference to the configured subclass of this base Document type.
StaticschemaEnsure that all Document classes share the same schema of their base declaration.
StaticTYPESThe allowed types which may exist for this Document class.
InternalGet textures that should be used for the currently active level.
InternalIdentify the collection in a parent Document that this Document belongs to, if any.
OptionalparentCollection: string | nullAn explicitly provided parent collection name.
Initialize the instance by copying data from the source object to instance attributes. This mirrors the workflow of SchemaField#initialize but with some added functionality.
Options provided to the model constructor
InternalInvalidate cached surface data.
Post-process a creation operation for a single Document instance. Post-operation events occur for all connected clients.
The initial data object provided to the document creation request
Additional options which modify the creation request
The id of the User requesting the document update
Post-process a deletion operation for a single Document instance. Post-operation events occur for all connected clients.
Additional options which modify the deletion request
The id of the User requesting the document update
Post-process an update operation for a single Document instance. Post-operation events occur for all connected clients.
The differential data that was changed relative to the documents prior values
Additional options which modify the update request
The id of the User requesting the document update
Pre-process a creation operation for a single Document instance. Pre-operation events only occur for the client which requested the operation.
Modifications to the pending Document instance must be performed using updateSource.
The initial data object provided to the document creation request
Additional options which modify the creation request
The User requesting the document creation
Return false to exclude this Document from the creation operation
Pre-process an update operation for a single Document instance. Pre-operation events only occur for the client which requested the operation.
The candidate changes to the Document
Additional options which modify the update request
The User requesting the document update
A return value of false indicates the update operation should be cancelled.
InternalReset the edges of this Scene.
Perform the second step of the DataModel#_updateSource workflow which applies the prepared diff to the model.
The prepared copy of source data with changes applied
The differential changes that were applied to source
Options which determine how the new data is merged
Data cleaning state which might include instructions for final commit
Perform the first step of the DataModel#_updateSource workflow which applies changes to a copy of model source data and records the resulting diff.
A mutable copy of model source data
New values which should be applied to the data model
Options which determine how the new data is merged
Data cleaning state
The resulting difference applied to source data
InternalUpdate the shape constraints of the given Regions if the current User is designated for it.
Test whether a given User has permission to perform some action on this Document
The User attempting modification
The attempted action
Optionaldata: object = {}Data involved in the attempted action
Does the User have permission?
Clear the movement history of all Tokens within this Scene.
Create multiple embedded Document instances within this parent Document using provided input data.
The name of the embedded Document type
An array of data objects used to create multiple documents
Optionaloperation: DatabaseCreateOperation = {}Parameters of the database creation workflow
An array of created Document instances
Create a 300px by 100px thumbnail image for this scene background
Optionaloptions: {Options which modify thumbnail creation
Optionalformat?: stringWhich image format should be used? image/png, image/jpeg, or image/webp. Default is image/webp.
Optionalheight?: numberThe desired thumbnail height. Default is 100px;
Optionallevel?: string | documents.LevelThe Level to generated the thumbnail for. Defaults to the initial level.
Optionalquality?: numberWhat compression quality should be used for jpeg or webp, between 0 and 1. Default is 0.8.
Optionalwidth?: numberThe desired thumbnail width. Default is 300px
The created thumbnail data.
Cycle the currently viewed Level for this Scene.
Delete this Document, removing it from the database.
Optionaloperation: Partial<Omit<DatabaseDeleteOperation, "ids">> = {}Parameters of the deletion operation
The deleted Document instance, or undefined if not deleted
Delete multiple embedded Document instances within a parent Document using provided string ids.
The name of the embedded Document type
An array of string ids for each Document to be deleted
Optionaloperation: DatabaseDeleteOperation = {}Parameters of the database deletion workflow
An array of deleted Document instances
Get the Canvas dimensions which would be used to display this Scene. Apply padding to enlarge the playable space and round to the nearest 2x grid size to ensure symmetry. The rounding accomplishes that the padding buffer around the map always contains whole grid spaces.
Obtain a reference to the Array of source data within the data object for a certain embedded Document name
The name of the embedded Document type
The Collection instance of embedded Documents of the requested type
Get an embedded document by its id from a named collection in the parent document.
The name of the embedded Document type
The id of the child document to retrieve
Optionaloptions: { invalid?: boolean; strict?: boolean } = {}Additional options which modify how embedded documents are retrieved
Optionalinvalid?: booleanAllow retrieving an invalid Embedded Document.
Optionalstrict?: booleanThrow an Error if the requested id does not exist. See Collection#get
The retrieved embedded Document instance, or undefined
Traverse the data model instance, obtaining the DataField definition for a field of a particular property.
A property key like ["abilities", "strength"] or "abilities.strength"
The corresponding DataField definition for that field, or undefined
Get the value of a "flag" for this document See the setFlag method for more details on flags
The flag scope which namespaces the key
The flag key
The flag value
Get all surfaces or surfaces matching the filter.
Optionaloptions: {Additional options
Optionalexposure?: booleanOnly return surfaces that have this value as RegionSurface#exposure
Optionallevel?: string | documents.LevelOnly return surfaces that are included in this Level
Optionalocclusion?: booleanOnly return surfaces that have this value as RegionSurface#occlusion
Optionaltype?: "move" | "light" | "sight" | "darkness" | "sound"Only return surfaces that restrict this type
Get the explicit permission level that a User has over this Document, a value in CONST.DOCUMENT_OWNERSHIP_LEVELS. Compendium content ignores the ownership field in favor of User role-based ownership. Otherwise, Documents use granular per-User ownership definitions and Embedded Documents defer to their parent ownership.
This method returns the value recorded in Document ownership, regardless of the User's role, for example a GAMEMASTER user might still return a result of NONE if they are not explicitly denoted as having a level.
To test whether a user has a certain capability over the document, testUserPermission should be used.
Optionaluser: BaseUserThe User being tested
A numeric permission level from CONST.DOCUMENT_OWNERSHIP_LEVELS
Initialize the edges of this Scene unless they already have been inititalized.
For Documents which include game system data, migrate the system data object to conform to its latest data model. The data model is defined by the template.json specification included by the game system.
The migrated system data object
Move/resize multiple Tokens.
The movement/resizing instructions.
Optionaloptions: Partial<Omit<DatabaseUpdateOperation, "updates"> & TokenMovementOptions>Parameters of the update and movement operation.
A Promise that resolves once all movement instructions are finished.
The resolved value is an object with token IDs as keys and booleans as values that indicate whether the movement
the token with the corresponding ID was completed (true) or stopped/prevented (false).
const results = await scene.moveTokens({
// Moving the token to new position including additional token data
"cGYT0rR0YbtFkhzT": {
destination: {x: 100, y: 200, rotation: 45, texture: {tint: "#ff0000"}},
showRuler: false, // This overrides `options.showRuler`
},
// Moving the token to along a path with multiple waypoints
"wBFpJuZuleEtVNw1": {
waypoints: [
{x: 100, y: 200}, // Move to the position (100, 200)
{elevation: 5, explicit: true}, // Move to elevation 5 indicating that the user placed this waypoint
{x: 500, y: 500, checkpoint: true}, // Move to (500, 500): the movement can be stopped/paused here
{width: 2, height: 2, depth: 2}, // Change size
{x: 1000, action: "swim"}, // Swim to (1000, 500)
{x: 0, y: 0, snapped: true}, // Move to (0, 0) indicating that (0, 0) is a snapped position for the token
{elevation: 10} // Move to elevation 10 (the last waypoint is always a checkpoint automatically)
],
autoRotate: true,
constrainOptions: {ignoreWalls: true, ignoreCost: true} // Allow the token to move through walls, surfaces, and
// impassable terrain
},
// Resizing the token including additional token data
"VupAIbzpX6SHqtaH": {
dimensions: {width: 3, height: 3, depth: 3, rotation: 45, texture: {tint: "#ff0000"}}
}
}, {
showRuler: true // This applies to all instructions that do not define `showRuler`
})
if ( results["cGYT0rR0YbtFkhzT"] ) {
// The movement of Token [cGYT0rR0YbtFkhzT] was completed: it arrived at the destination
} else {
// The movement of Token [cGYT0rR0YbtFkhzT] was stopped or prevented
}
if ( results["wBFpJuZuleEtVNw1"] ) {
// The movement of Token [wBFpJuZuleEtVNw1] was completed: it arrived at the destination
} else {
// The movement of Token [wBFpJuZuleEtVNw1] was stopped or prevented
}
if ( results["VupAIbzpX6SHqtaH"] ) {
// The resizing of Token [VupAIbzpX6SHqtaH] was completed
} else {
// The resizing of Token [VupAIbzpX6SHqtaH] was prevented
}
Pull the specified users to this Scene.
Optionalusers: any[] = []An array of User documents or IDs.
Assign a "flag" to this document. Flags represent key-value type data which can be used to store flexible or arbitrary data required by either the core software, game systems, or user-created modules.
Each flag should be set using a scope which provides a namespace for the flag to help prevent collisions.
Flags set by the core software use the "core" scope. Flags set by game systems or modules should use the canonical name attribute for the module Flags set by an individual world should "world" as the scope.
Flag values can assume almost any data type. Setting a flag value to null will delete that flag.
The flag scope which namespaces the key
The flag key
The flag value
A Promise resolving to the updated document
Test for surface collision for a movement between two points.
The origin.
The destination.
Configuration.
The Level or Level ID to test collision in.
Optionalmode?: "any" | "closest" | "all"The collision mode. Default: "any".
Optionalside?: "below" | "above"The side of the surface that counts as colliding
when the ray originates on the surface. Default: "below".
- "below": Treats the surface as solid in the negative z-direction.
Rays originating on the surface will collide if they point downward
(z < 0) and will not collide if they point upward.
- "above": Treats the surface as solid in the positive z-direction.
Rays originating on the surface will collide if they point upward
(z > 0) and will not collide if they point downward.
OptionaltMax?: numberIntersections of the ray and a surface with t-value greater than
tMax are not considered collisions. Default: 1.
OptionaltMin?: numberIntersections of the ray and a surface with t-value less than
tMin are not considered collisions. Default: 0.
Optionaltype?: "move" | "light" | "sight" | "darkness" | "sound"The restriction type. Default: "move".
The collision result depends on the mode of the test:
- "any": Returns a boolean for whether any collision occurred.
- "all": Returns a sorted array of ElevatedPoint instances.
- "closest": Returns an ElevatedPoint instance or null.
Test whether a certain User has a requested permission level (or greater) over the Document
The User being tested
The permission level from DOCUMENT_OWNERSHIP_LEVELS to test
Additional options involved in the permission test
Optionalexact?: booleanRequire the exact permission level requested?
Does the user have this permission level over the Document?
Extract the source data for the DataModel into a simple object format that can be serialized.
The document source data expressed as a plain object
Copy and transform the DataModel into a plain object. Draw the values of the extracted object from the data source (by default) otherwise from its transformed values.
Draw values from the underlying data source rather than transformed values
The extracted primitive object
Remove a flag assigned to the document.
The flag scope which namespaces the key
The flag key
The updated document instance
Update this Document using incremental data, saving it to the database.
Optionaldata: object = {}Differential update data which modifies the existing values of this document
Optionaloperation: Partial<Omit<DatabaseUpdateOperation, "updates">> = {}Parameters of the update operation
The updated Document instance, or undefined not updated
Update multiple embedded Document instances within a parent Document using provided differential data.
The name of the embedded Document type
An array of differential data objects, each used to update a single Document
Optionaloperation: DatabaseUpdateOperation = {}Parameters of the database update workflow
An array of updated Document instances
Update the shape constraints of all Regions the current User is designated for (for the given restriction types).
Optionaltypes: Iterable<"move" | "light" | "sight" | "darkness" | "sound", any, any> = CONST.EDGE_RESTRICTION_TYPESThe types to update. Default: all.
Update the DataModel locally by applying an object of changes to its source data. The provided changes are expanded, cleaned, validated, and stored to the source data object for this model. The provided changes argument is mutated in this process. The source data is then re-initialized to apply those changes to the prepared data. The method returns an object of differential changes which modified the original data.
New values which should be applied to the data model
Options which determine how the new data is merged
An object containing differential keys and values that were changed
For all Tokens in this Scene identify the Regions that each Token is contained in and update the regions of each Token accordingly.
This function doesn't need to be called by the systems/modules unless
foundry.documents.TokenDocument#testInsideRegion is overridden and non-Token properties other than
Scene#grid.type and Scene#grid.size change that are used in the override of
foundry.documents.TokenDocument#testInsideRegion.
The array of Tokens whose regions changed
For the given Tokens in this Scene identify the Regions that each Token is contained in and update the regions of each Token accordingly.
This function doesn't need to be called by the systems/modules unless
foundry.documents.TokenDocument#testInsideRegion is overridden and non-Token properties other than
Scene#grid.type and Scene#grid.size change that are used in the override of
foundry.documents.TokenDocument#testInsideRegion.
The Tokens whoses regions should be updates
The array of Tokens whose regions changed
Validate the data contained in the document to check for type and content. This method is intended to validate complete model records, verifying both individual field validation as well as joint model validity.
For validating sets of partial model changes, it is preferred to call DataModel#updateSource as a dryRun. This
method provides a convenience alias for such a workflow if changes are provided.
Warning: if fallback handling is allowed, this process will mutate provided changes or model source data.
Options which modify how the model is validated
Whether the data source or proposed change is reported as valid. A boolean is always returned if validation is non-strict.
Set this scene as the current view
Optionaloptions: SceneViewOptions = {}The view options
Protected_ProtectedInitialize the source data for a new DataModel instance. One-time migrations and initial cleaning operations are applied to the source data.
The candidate source data from which the model will be constructed
Optionaloptions: DocumentConstructionContext = {}Options provided to the model constructor
Migrated and cleaned source data which will be stored to the model instance,
which is the same object as the data argument
Protected_ProtectedHandle Scene activation workflow if the active state is changed to true.
Is the scene now active?
Protected_ProtectedPre-process a deletion operation for a single Document instance. Pre-operation events only occur for the client which requested the operation.
Additional options which modify the deletion request
The User requesting the document deletion
A return value of false indicates the deletion operation should be cancelled.
Protected_ProtectedPrepare the state object that is transacted through an updateSource operation.
New values which should be applied to the data model
Options which determine how the new data is merged
Data model update state
Static_InternalDefine a simple migration from one field name to another. The value of the data can be transformed during the migration by an optional application function.
The data object being migrated
The old field name
The new field name
Optionalapply: (data: object) => anyAn application function, otherwise the old value is applied
Whether a migration was applied.
Static_InternalA reusable helper for adding a migration shim The value of the data can be transformed during the migration by an optional application function.
The data object being shimmed
The old field name
The new field name
Optionaloptions: { value?: any; warning?: string } = {}Options passed to foundry.utils.logCompatibilityWarning
Optionalvalue?: anyThe value of the shim
Optionalwarning?: stringThe deprecation message
Static_InternalA reusable helper for adding migration shims.
The data object being shimmed
The mapping of old keys to new keys
Optionaloptions: { value?: any; warning?: string }Options passed to foundry.utils.logCompatibilityWarning
Optionalvalue?: anyThe value of the shim
Optionalwarning?: stringThe deprecation message
Static_InternalClear the fields from the given Document data recursively.
The (partial) Document data
The fields that are cleared
Optionaloptions: { callback?: RecursiveFieldClearCallback } = {}Optionalcallback?: RecursiveFieldClearCallbackA callback that is invoked on each field in order to clear it.
Static_InternalLog a compatbility warning for the data field migration.
The old field name
The new field name
Optionaloptions: object = {}Options passed to foundry.utils.logCompatibilityWarning
Static_Static_Apply preliminary model-specific cleaning rules or alter cleaning options or initial state. Subclass models may implement this function to configure the cleaning workflow. Any mutations to data, options, or _state parameters are performed inplace.
The provided input data for cleaning
Options which define how cleaning should be performed
The data cleaning state
Static_Pre-process a creation operation, potentially altering its instructions or input data. Pre-operation events only occur for the client which requested the operation.
This batch-wise workflow occurs after individual _preCreate workflows and provides a final pre-flight check before a database operation occurs.
Modifications to pending documents must mutate the documents array or alter individual document instances using updateSource.
Pending document instances to be created
Parameters of the database creation operation
The User requesting the creation operation
Return false to cancel the creation operation entirely
StaticcanTest whether a given User has sufficient permissions to create Documents of this type in general. This does not guarantee that the User is able to create all Documents of this type, as certain document-specific requirements may also be present.
Generally speaking, this method is used to verify whether a User should be presented with the option to create Documents of this type in the UI.
The User being tested
Does the User have a sufficient role to create?
StaticcleanClean a data source object to conform to a specific provided schema.
Optionaldata: object = {}Provided model data that requires cleaning
Optionaloptions: DataModelCleaningOptions = {}Options that configure how data cleaning is performed
Optional_state: Partial<data.types.DataModelUpdateState> = {}Internal options used during cleaning recursion
Cleaned data which is suitable for validation and usage
StaticcreateCreate a new Document using provided input data, saving it to the database.
Optionaldata: Initial data used to create this Document, or a Document instance to persist.
Optionaloperation: Partial<Omit<DatabaseCreateOperation, "data">> = {}Parameters of the creation operation
The created Document instance(s)
const data = [{name: "Special Sword", type: "weapon"}];
const created = await Item.implementation.create(data);
StaticcreateCreate multiple Documents using provided input data. Data is provided as an array of objects where each individual object becomes one new Document.
An array of data objects or existing Documents to persist.
Optionaloperation: Partial<Omit<DatabaseCreateOperation, "data">> = {}Parameters of the requested creation operation
An array of created Document instances
const data = [{name: "New Actor", type: "character", img: "path/to/profile.jpg"}];
const created = await Actor.implementation.createDocuments(data);
const data = [{name: "Tim", type: "npc"], [{name: "Tom", type: "npc"}];
const created = await Actor.implementation.createDocuments(data);
StaticdefineDefine the data schema for models of this type. The schema is populated the first time it is accessed and cached for future reuse.
The schema, through its fields, provide the essential cleaning, validation, and initialization methods to turn the _source values into direct properties of the data model. The schema is a static property of the model and is reused by all instances to perform validation.
The schemas defined by the core software in classes like foundry.documents.BaseActor are validated by the
server, where user code does not run. However, almost all documents have a flags field to store data, and many
have a system field that can be configured to be a foundry.abstract.TypeDataModel instance. Those models
are not constructed on the server and rely purely on client-side code, which means certain extra-sensitive fields
must be also be registered through your package manifest. foundry.packages.types.ServerSanitizationFields
class SomeModel extends foundry.abstract.DataModel {
static defineSchema() {
return {
foo: new foundry.data.fields.StringField()
}
}
}
class AnotherModel extends SomeModel {
static defineSchema() {
// Inheritance and object oriented principles apply to schema definition
const schema = super.defineSchema()
schema.bar = new foundry.data.fields.NumberField()
return schema;
}
}
StaticdeleteDelete one or multiple existing Documents using an array of provided ids. Data is provided as an array of string ids for the documents to delete.
An array of string ids for the documents to be deleted
Optionaloperation: Partial<Omit<DatabaseDeleteOperation, "ids">> = {}Parameters of the database deletion operation
An array of deleted Document instances
const tim = game.actors.getName("Tim");
const deleted = await Actor.implementation.deleteDocuments([tim.id]);
const tim = game.actors.getName("Tim");
const tom = game.actors.getName("Tom");
const deleted = await Actor.implementation.deleteDocuments([tim.id, tom.id]);
StaticfromCreate a DataModel instance using a provided serialized JSON string.
Serialized document data in string format
A constructed data model instance
StaticfromCreate a new instance of this DataModel from a source record. The source data is presumed trustworthy and is not strictly validated unless explicitly requested.
Initial document data which comes from a trusted source.
Optionalcontext: Omit<DataModelConstructionContext, "strict"> & DataModelFromSourceOptions = {}Model construction context
StaticgetGet a World-level Document of this type by its id.
The Document ID
Optionaloperation: DatabaseGetOperation = {}Parameters of the get operation
The retrieved Document, or null
StaticgetA compatibility method that returns the appropriate name of an embedded collection within this Document.
An existing collection name or a document name.
The provided collection name if it exists, the first available collection for the document name provided, or null if no appropriate embedded collection could be found.
StaticmigrateMigrate candidate source data for this DataModel which may require initial cleaning or transformations.
Candidate source data for the module, before further cleaning
Migrated source data, ready for further cleaning
StaticmigrateWrap data migration in a try/catch which attempts it safely.
Candidate source data for the module, before further cleaning
Optionaloptions: Readonly<DataModelCleaningOptions> = {}Additional options for how the field is cleaned
Migrated source data, ready for further cleaning
StaticshimTake data which conforms to the current data schema and add backwards-compatible accessors to it in order to support older code which uses this data.
Data which matches the current schema
Additional shimming options
Data with added backwards-compatible properties, which is the same object as
the data argument
StaticupdateUpdate multiple Document instances using provided differential data. Data is provided as an array of objects where each individual object updates one existing Document.
An array of differential data objects, each used to update a single Document
Optionaloperation: Partial<Omit<DatabaseUpdateOperation, "updates">> = {}Parameters of the database update operation
An array of updated Document instances
const updates = [{_id: "12ekjf43kj2312ds", name: "Timothy"}];
const updated = await Actor.implementation.updateDocuments(updates);
const updates = [{_id: "12ekjf43kj2312ds", name: "Timothy"}, {_id: "kj549dk48k34jk34", name: "Thomas"}]};
const updated = await Actor.implementation.updateDocuments(updates);
StaticvalidateEvaluate joint validation rules which apply validation conditions across multiple fields of the model. Field-specific validation rules should be defined as part of the DataSchema for the model. This method allows for testing aggregate rules which impose requirements on the overall model.
Candidate data for the model
Protected Static_ProtectedApply final custom model-specific cleaning rules after data schema fields are cleaned. Subclass models can implement this function as an ideal place to apply custom imputation or cleaning. Cleaning must be done in-place rather than returning a different object.
The provided input data for cleaning
Options which define how cleaning was performed
The data cleaning state
The original data object, with cleaning performed inplace
Protected Static_ProtectedPost-process a creation operation, reacting to database changes which have occurred. Post-operation events occur for all connected clients.
This batch-wise workflow occurs after individual _onCreate workflows.
The Document instances which were created
Parameters of the database creation operation
The User who performed the creation operation
Protected Static_ProtectedPost-process a deletion operation, reacting to database changes which have occurred. Post-operation events occur for all connected clients.
This batch-wise workflow occurs after individual _onDelete workflows.
The Document instances which were deleted
Parameters of the database deletion operation
The User who performed the deletion operation
Protected Static_ProtectedPre-process a deletion operation, potentially altering its instructions or input data. Pre-operation events only occur for the client which requested the operation.
This batch-wise workflow occurs after individual _preDelete workflows and provides a final pre-flight check before a database operation occurs.
Modifications to the requested deletions are performed by mutating the operation object. updateSource.
Document instances to be deleted
Parameters of the database update operation
The User requesting the deletion operation
Return false to cancel the deletion operation entirely
Protected Static_ProtectedPre-process an update operation, potentially altering its instructions or input data. Pre-operation events only occur for the client which requested the operation.
This batch-wise workflow occurs after individual _preUpdate workflows and provides a final pre-flight check before a database operation occurs.
Modifications to the requested updates are performed by mutating the data array of the operation.
Document instances to be updated
Parameters of the database update operation
The User requesting the update operation
Return false to cancel the update operation entirely
The client-side Scene document which extends the common BaseScene model.
Mixes
ClientDocumentMixin
See