KMP PHP API Reference

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

Methods

afterSave()

After save callback

public afterSave(EventInterface $event, EntityInterface $entity, ArrayObject $options) : void

Syncs template activities from the gathering type when:

  1. A new gathering is created
  2. 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
RulesChecker

findByBranch()

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
SelectQuery

findByDateRange()

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
SelectQuery

findByType()

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
SelectQuery

findOrCreate()

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
Gathering

get()

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
Gathering

initialize()

Initialize method

public initialize(array<string, mixed> $config) : void
Parameters
$config : array<string, mixed>

The configuration for the Table.

newEntities()

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
Gathering

patchEntities()

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
Gathering

save()

public save(EntityInterface $entity[, array<string|int, mixed> $options = = '[]' ]) : Gathering|false
Parameters
$entity : EntityInterface
$options : array<string|int, mixed> = = '[]'
Return values
Gathering|false

saveOrFail()

public saveOrFail(EntityInterface $entity[, array<string|int, mixed> $options = = '[]' ]) : Gathering
Parameters
$entity : EntityInterface
$options : array<string|int, mixed> = = '[]'
Return values
Gathering

syncTemplateActivities()

Sync template activities from the gathering type to the gathering

public syncTemplateActivities(EntityInterface $gathering) : void

This method:

  1. Fetches all template activities for the gathering type
  2. Adds any missing activities to the gathering
  3. 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.

Return values
Validator

        
On this page

Search results