Entity API shorthand module.
Provides various entry-point methods into the Entity API, mainly for aquiring entity instances.
- Version:
- 15.4.5
- Source:
Object Literals
Methods
(static) findById(entityId) → {entity/js/api/Entity}
stable API
Finds entity by a given ID - ignoring the case
Parameters:
Name | Type | Description |
---|---|---|
entityId |
String | ID of the entity to get |
- Version:
- 15.4.5
- Source:
Returns:
entity
- Type
- entity/js/api/Entity
Example
var Entities = Abcs.Entities();
var entity = Entities.findById('EntityID');
(static) getAll() → {Array.<entity/js/api/Entity>}
stable API
Gets all entities.
- Version:
- 15.4.5
- Source:
Returns:
array of entities
- Type
- Array.<entity/js/api/Entity>
Example
var Entities = Abcs.Entities();
var entityInstances = Entities.getAll();
// do something with the entities
entityInstances.forEach(function (entity) {
// do something with the entity, such as:
console.log('Entity ' + entity.getId() + ' has the following properties:');
entity.getProperties().forEach(function (property) {
console.log(property.getId());
};
};