AfformEventEntityTrait
Table of Contents
Properties
- $entityIds : array<string|int, mixed>
- Ids of each saved entity.
- $entityName : string
- $entityType : string
Methods
- getEntity() : array{type: string, fields: array, joins: array, security: string, actions: array}
- getEntityId() : mixed
- Get the id of an instance of the current entity
- getEntityIds() : array<string|int, mixed>
- Get the id(s) of an entity
- getEntityName() : string
- Get the entity name associated with this event
- getEntityType() : string
- Get the entity type associated with this event
- getSecureApi4() : callable
- setEntityId() : $this
- setJoinIds() : $this
Properties
$entityIds
Ids of each saved entity.
private
array<string|int, mixed>
$entityIds
Each key in the array corresponds to the name of an entity,
and the value is an array of ids
(because of <af-repeat>
all entities are treated as if they may be multi)
E.g. $entityIds['Individual1'] = [1];
$entityName
private
string
$entityName
entityName e.g. Individual1, Activity1,
$entityType
private
string
$entityType
entityType
Methods
getEntity()
public
getEntity() : array{type: string, fields: array, joins: array, security: string, actions: array}
Return values
array{type: string, fields: array, joins: array, security: string, actions: array}getEntityId()
Get the id of an instance of the current entity
public
getEntityId([int $index = 0 ]) : mixed
Parameters
- $index : int = 0
getEntityIds()
Get the id(s) of an entity
public
getEntityIds([string|null $entityName = NULL ]) : array<string|int, mixed>
Parameters
- $entityName : string|null = NULL
Return values
array<string|int, mixed>getEntityName()
Get the entity name associated with this event
public
getEntityName() : string
Return values
stringgetEntityType()
Get the entity type associated with this event
public
getEntityType() : string
Return values
stringgetSecureApi4()
public
getSecureApi4() : callable
Return values
callable —API4-style
setEntityId()
public
setEntityId(int $index, int|string $entityId) : $this
Parameters
- $index : int
- $entityId : int|string
Return values
$thissetJoinIds()
public
setJoinIds(int $index, string $joinEntity, array<string|int, mixed> $joinIds) : $this
Parameters
- $index : int
- $joinEntity : string
- $joinIds : array<string|int, mixed>