GatheringAttendancesTable
extends Table
in package
GatheringAttendances Model
Join table connecting members to gatherings with attendance information and various sharing permission options.
Table of Contents
Properties
- $Creators : MembersTable|BelongsTo
- $Gatherings : GatheringsTable|BelongsTo
- $Members : MembersTable|BelongsTo
- $Modifiers : MembersTable|BelongsTo
Methods
- beforeSave() : void
- Enforce minor RSVP sharing rules.
- buildRules() : RulesChecker
- Returns a rules checker object that will be used for validating application integrity.
- findOrCreate() : GatheringAttendance
- findPublic() : SelectQuery
- Finder for public attendances
- findShared() : SelectQuery
- Finder for any shared attendances
- findSharedWithCrown() : SelectQuery
- Finder for attendances shared with crown
- findSharedWithHostingGroup() : SelectQuery
- Finder for attendances shared with hosting group
- findSharedWithKingdom() : SelectQuery
- Finder for attendances shared with kingdom
- get() : GatheringAttendance
- getAttendanceCount() : int
- Get attendance count for a gathering
- initialize() : void
- Initialize method
- isAttending() : bool
- Check if a member is attending a gathering
- newEmptyEntity() : GatheringAttendance
- newEntities() : array<string|int, GatheringAttendance>
- newEntity() : GatheringAttendance
- patchEntities() : array<string|int, GatheringAttendance>
- patchEntity() : GatheringAttendance
- save() : GatheringAttendance|false
- saveOrFail() : GatheringAttendance
- validationDefault() : Validator
- Default validation rules.
Properties
$Creators
public
MembersTable|BelongsTo
$Creators
$Gatherings
public
GatheringsTable|BelongsTo
$Gatherings
$Members
public
MembersTable|BelongsTo
$Members
$Modifiers
public
MembersTable|BelongsTo
$Modifiers
Methods
beforeSave()
Enforce minor RSVP sharing rules.
public
beforeSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Members under 18 cannot share RSVPs with the kingdom.
Parameters
- $event : EventInterface
-
Event
- $entity : EntityInterface
-
Entity being saved
- $options : ArrayObject
-
Save options
buildRules()
Returns a rules checker object that will be used for validating application integrity.
public
buildRules(RulesChecker $rules) : RulesChecker
Parameters
- $rules : RulesChecker
-
The rules object to be modified.
Return values
RulesCheckerfindOrCreate()
public
findOrCreate(mixed $search[, callable|null $callback = = 'null' ][, array<string|int, mixed> $options = = '[]' ]) : GatheringAttendance
Parameters
- $search : mixed
- $callback : callable|null = = 'null'
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringAttendancefindPublic()
Finder for public attendances
public
findPublic(SelectQuery $query) : SelectQuery
Parameters
- $query : SelectQuery
-
The query to modify
Return values
SelectQueryfindShared()
Finder for any shared attendances
public
findShared(SelectQuery $query) : SelectQuery
Parameters
- $query : SelectQuery
-
The query to modify
Return values
SelectQueryfindSharedWithCrown()
Finder for attendances shared with crown
public
findSharedWithCrown(SelectQuery $query) : SelectQuery
Parameters
- $query : SelectQuery
-
The query to modify
Return values
SelectQueryfindSharedWithHostingGroup()
Finder for attendances shared with hosting group
public
findSharedWithHostingGroup(SelectQuery $query) : SelectQuery
Parameters
- $query : SelectQuery
-
The query to modify
Return values
SelectQueryfindSharedWithKingdom()
Finder for attendances shared with kingdom
public
findSharedWithKingdom(SelectQuery $query) : SelectQuery
Parameters
- $query : SelectQuery
-
The query to modify
Return values
SelectQueryget()
public
get(mixed $primaryKey[, array<string|int, mixed>|string $finder = = '\'all\'' ][, CacheInterface|string|null $cache = = 'null' ][, Closure|string|null $cacheKey = = 'null' ], mixed ...$args) : GatheringAttendance
Parameters
- $primaryKey : mixed
- $finder : array<string|int, mixed>|string = = '\'all\''
- $cache : CacheInterface|string|null = = 'null'
- $cacheKey : Closure|string|null = = 'null'
- $args : mixed
Return values
GatheringAttendancegetAttendanceCount()
Get attendance count for a gathering
public
getAttendanceCount(int $gatheringId) : int
Parameters
- $gatheringId : int
-
The gathering ID
Return values
intinitialize()
Initialize method
public
initialize(array<string, mixed> $config) : void
Parameters
- $config : array<string, mixed>
-
The configuration for the Table.
isAttending()
Check if a member is attending a gathering
public
isAttending(int $gatheringId, int $memberId) : bool
Parameters
- $gatheringId : int
-
The gathering ID
- $memberId : int
-
The member ID
Return values
boolnewEmptyEntity()
public
newEmptyEntity() : GatheringAttendance
Return values
GatheringAttendancenewEntities()
public
newEntities(array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : array<string|int, GatheringAttendance>
Parameters
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
array<string|int, GatheringAttendance>newEntity()
public
newEntity(array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : GatheringAttendance
Parameters
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringAttendancepatchEntities()
public
patchEntities(iterable<string|int, mixed> $entities, array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : array<string|int, GatheringAttendance>
Parameters
- $entities : iterable<string|int, mixed>
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
array<string|int, GatheringAttendance>patchEntity()
public
patchEntity(EntityInterface $entity, array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : GatheringAttendance
Parameters
- $entity : EntityInterface
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringAttendancesave()
public
save(EntityInterface $entity[, array<string|int, mixed> $options = = '[]' ]) : GatheringAttendance|false
Parameters
- $entity : EntityInterface
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringAttendance|falsesaveOrFail()
public
saveOrFail(EntityInterface $entity[, array<string|int, mixed> $options = = '[]' ]) : GatheringAttendance
Parameters
- $entity : EntityInterface
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringAttendancevalidationDefault()
Default validation rules.
public
validationDefault(Validator $validator) : Validator
Parameters
- $validator : Validator
-
Validator instance.