The object's data.
The instance of Nymph to use for queries.
The creation date of the entity as a Unix timestamp in milliseconds.
The entity's Globally Unique ID.
This is a 12 byte number represented as a lower case HEX string (24 characters).
The modified date of the entity as a Unix timestamp in milliseconds.
Array of the entity's tags.
Add one or more tags.
List of tags.
Search the array for this object and return the corresponding index.
If strict is false, is() is used to compare. If strict is true,
equals() is used.
The array to search.
Optionalstrict: booleanWhether to use stronger comparison.
The index if the object is in the array, -1 if it isn't.
Replace any referenced entities in the data with sleeping references.
Calling this function ensures that the next time a referenced entity is accessed, it will be retrieved from the DB (unless it is in Nymph's cache).
Delete the object from storage.
True on success, false on failure.
Perform a more strict comparison of this object to another.
The object to compare.
True or false.
Get the client enabled methods.
The names of methods allowed to be called by the frontend with serverCall.
Used to retrieve the data object.
This should only be used by Nymph to save the data into storage.
OptionalincludeSData: booleanWhether to include the serialized data as well.
OptionalreferenceOnlyExisting: booleanWhether to only turn existing entities into references.
The entity's data object.
Get a GUID for the entity.
If the entity has already been saved, this will just return the GUID.
If the entity has not yet been saved, this will return a new GUID that gets
held by the entity. The guid property will remain null, but this method
will then always return the same GUID. When the entity is eventually saved
into the database, this GUID will be used.
Used to retrieve the serialized data object.
This should only be used by Nymph to save the data object into storage.
This method is used by Nymph to avoid unserializing data that hasn't been requested yet.
It should always be called after getData().
The entity's serialized data object.
Get the entity's tags.
Using this instead of accessing the tags prop directly will wake sleeping
references.
The entity's tags.
Get an array of strings that must be unique across the current etype.
When you try to save another entity with any of the same unique strings, Nymph will throw an error.
The default implementation of this method returns an empty array, meaning there are no uniqueness constraints applied to its etype.
Resolves to an array of entity's unique constraint strings.
Get an object that holds the same data as the entity.
This provides an object that can be validated.
A pure object representation of the entity.
Check that the entity has all of the given tags.
List of tags.
True or false.
Check whether this object is in an array.
If strict is false, is() is used to compare. If strict is true,
equals() is used.
The array to search.
Optionalstrict: booleanWhether to use stronger comparison.
True if the object is in the array, false if it isn't.
Perform a less strict comparison of this object to another.
The object to compare.
True or false.
Accept JSON data from the client.
This function uses the security protection lists:
The input data. Please note, this will be modified (destroyed).
OptionalallowConflict: booleanAllow to accept data that is older than the current data.
Accept JSON patch from the client.
This function uses the security protection lists:
The patch data. Please note, this will be modified (destroyed).
OptionalallowConflict: booleanAllow to accept data that is older than the current data.
Used to set the data.
This should only be used by Nymph to push the data from storage or the client.
sdata is used by Nymph to avoid unserializing data that hasn't been
requested yet.
If source is set to "server", the data is coming from the DB or the
cache. If not, assume the data is coming from the client and can't be
trusted.
The data object.
Optionalsdata: SerializedEntityDataThe serialized data object.
Optionalsource: "server"If this is set to "server", the data is coming from the DB.
Refresh the object from storage. (Bypasses Nymph's cache.)
If the object has been deleted from storage, the database cannot be
reached, or a database error occurs, refresh() will return 0.
False if the data has not been saved, 0 if it can't be refreshed, true on success.
Remove one or more tags.
List of tags.
Save the object to storage.
True on success, false on failure.
Return a Nymph Entity Reference for this entity.
If the entity hasn't been saved yet (and has no GUID), it will use the
guaranteed GUID from $getGuaranteedGUID, unless existingOnly is true,
then it will return the entity.
OptionalexistingOnly: booleanWhether to only turn existing entities into references.
A Nymph Entity Reference array.
Set whether to use "skipAc" when accessing entity references.
True or false, whether to use it.
Entity interface.