GatheringsTable
extends Table
in package
Gatherings Model
Table of Contents
Properties
- $Branches : BranchesTable|BelongsTo
- $Creators : MembersTable|BelongsTo
- $GatheringActivities : GatheringActivitiesTable|BelongsToMany
- $GatheringAttendances : GatheringAttendancesTable|HasMany
- $GatheringScheduledActivities : GatheringScheduledActivitiesTable|HasMany
- $GatheringStaff : GatheringStaffTable|HasMany
- $GatheringTypes : GatheringTypesTable|BelongsTo
- $GatheringWaivers : GatheringWaiversTable|HasMany
Methods
- afterSave() : void
- After save callback
- buildRules() : RulesChecker
- Returns a rules checker object that will be used for validating application integrity.
- findByBranch() : SelectQuery
- Find gatherings by branch
- findByDateRange() : SelectQuery
- Find gatherings by date range
- findByType() : SelectQuery
- Find gatherings by type
- findOrCreate() : Gathering
- get() : Gathering
- initialize() : void
- Initialize method
- newEmptyEntity() : Gathering
- newEntities() : array<string|int, Gathering>
- newEntity() : Gathering
- patchEntities() : array<string|int, Gathering>
- patchEntity() : Gathering
- save() : Gathering|false
- saveOrFail() : Gathering
- syncTemplateActivities() : void
- Sync template activities from the gathering type to the gathering
- validationDefault() : Validator
- Default validation rules.
Properties
$Branches
public
BranchesTable|BelongsTo
$Branches
$Creators
public
MembersTable|BelongsTo
$Creators
$GatheringActivities
public
GatheringActivitiesTable|BelongsToMany
$GatheringActivities
$GatheringAttendances
public
GatheringAttendancesTable|HasMany
$GatheringAttendances
$GatheringScheduledActivities
public
GatheringScheduledActivitiesTable|HasMany
$GatheringScheduledActivities
$GatheringStaff
public
GatheringStaffTable|HasMany
$GatheringStaff
$GatheringTypes
public
GatheringTypesTable|BelongsTo
$GatheringTypes
$GatheringWaivers
public
GatheringWaiversTable|HasMany
$GatheringWaivers
Methods
afterSave()
After save callback
public
afterSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void
Syncs template activities from the gathering type when:
- A new gathering is created
- The gathering type is changed
Parameters
- $event : EventInterface
-
The event object
- $entity : EntityInterface
-
The saved entity
- $options : ArrayObject
-
Options passed to save
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
RulesCheckerfindByBranch()
Find gatherings by branch
public
findByBranch(SelectQuery $query, array<string|int, mixed> $options) : SelectQuery
Parameters
- $query : SelectQuery
-
Query object
- $options : array<string|int, mixed>
-
Options including 'branch_id'
Return values
SelectQueryfindByDateRange()
Find gatherings by date range
public
findByDateRange(SelectQuery $query, array<string|int, mixed> $options) : SelectQuery
Parameters
- $query : SelectQuery
-
Query object
- $options : array<string|int, mixed>
-
Options including 'start' and 'end'
Return values
SelectQueryfindByType()
Find gatherings by type
public
findByType(SelectQuery $query, array<string|int, mixed> $options) : SelectQuery
Parameters
- $query : SelectQuery
-
Query object
- $options : array<string|int, mixed>
-
Options including 'gathering_type_id'
Return values
SelectQueryfindOrCreate()
public
findOrCreate(mixed $search[, callable|null $callback = = 'null' ][, array<string|int, mixed> $options = = '[]' ]) : Gathering
Parameters
- $search : mixed
- $callback : callable|null = = 'null'
- $options : array<string|int, mixed> = = '[]'
Return values
Gatheringget()
public
get(mixed $primaryKey[, array<string|int, mixed>|string $finder = = '\'all\'' ][, CacheInterface|string|null $cache = = 'null' ][, Closure|string|null $cacheKey = = 'null' ], mixed ...$args) : Gathering
Parameters
- $primaryKey : mixed
- $finder : array<string|int, mixed>|string = = '\'all\''
- $cache : CacheInterface|string|null = = 'null'
- $cacheKey : Closure|string|null = = 'null'
- $args : mixed
Return values
Gatheringinitialize()
Initialize method
public
initialize(array<string, mixed> $config) : void
Parameters
- $config : array<string, mixed>
-
The configuration for the Table.
newEmptyEntity()
public
newEmptyEntity() : Gathering
Return values
GatheringnewEntities()
public
newEntities(array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : array<string|int, Gathering>
Parameters
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
array<string|int, Gathering>newEntity()
public
newEntity(array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : Gathering
Parameters
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringpatchEntities()
public
patchEntities(iterable<string|int, mixed> $entities, array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : array<string|int, Gathering>
Parameters
- $entities : iterable<string|int, mixed>
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
array<string|int, Gathering>patchEntity()
public
patchEntity(EntityInterface $entity, array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : Gathering
Parameters
- $entity : EntityInterface
- $data : array<string|int, mixed>
- $options : array<string|int, mixed> = = '[]'
Return values
Gatheringsave()
public
save(EntityInterface $entity[, array<string|int, mixed> $options = = '[]' ]) : Gathering|false
Parameters
- $entity : EntityInterface
- $options : array<string|int, mixed> = = '[]'
Return values
Gathering|falsesaveOrFail()
public
saveOrFail(EntityInterface $entity[, array<string|int, mixed> $options = = '[]' ]) : Gathering
Parameters
- $entity : EntityInterface
- $options : array<string|int, mixed> = = '[]'
Return values
GatheringsyncTemplateActivities()
Sync template activities from the gathering type to the gathering
public
syncTemplateActivities(EntityInterface $gathering) : void
This method:
- Fetches all template activities for the gathering type
- Adds any missing activities to the gathering
- Re-evaluates not_removable for all existing activities based on the current template
Parameters
- $gathering : EntityInterface
-
The gathering entity
validationDefault()
Default validation rules.
public
validationDefault(Validator $validator) : Validator
Parameters
- $validator : Validator
-
Validator instance.