KMP PHP API Reference

ActivityGroupsTable extends BaseTable
in package

Manages ActivityGroup entities for categorical organization of activities.

Provides data access, validation, and organizational structure for activity categorization. Activity groups serve as logical containers enabling hierarchical organization and administrative management.

Tags
see
ActivityGroup

ActivityGroup entity class

see

/docs/5.6.6-activity-groups-entity-reference.md For comprehensive documentation

Table of Contents

Constants

CACHE_GROUPS_TO_CLEAR  = []
CACHES_TO_CLEAR  = []
ID_CACHES_TO_CLEAR  = []

Properties

$Activities  : ActivitiesTable|HasMany

Methods

addBranchScopeQuery()  : SelectQuery
Add branch-based data scoping to a query.
afterDelete()  : void
After delete hook to capture impersonation audit trail entries.
afterSave()  : void
After-save handler for automatic cache invalidation.
get()  : ActivityGroup
initialize()  : void
Initialize method - configures table associations and behaviors.
newEmptyEntity()  : ActivityGroup
newEntity()  : ActivityGroup
save()  : ActivityGroup|false
validationDefault()  : Validator
Default validation rules for activity group data integrity.
logImpersonationAction()  : void
Record impersonated writes to audit log table.

Constants

CACHE_GROUPS_TO_CLEAR

protected array<string|int, string> CACHE_GROUPS_TO_CLEAR = []

Cache groups to clear entirely on save

CACHES_TO_CLEAR

protected array<string|int, array{string, string}> CACHES_TO_CLEAR = []

Static cache entries to clear on save

ID_CACHES_TO_CLEAR

protected array<string|int, array{string, string}> ID_CACHES_TO_CLEAR = []

Entity-ID cache prefixes to clear on save

Properties

Methods

addBranchScopeQuery()

Add branch-based data scoping to a query.

public addBranchScopeQuery(SelectQuery $query, array<string|int, int> $branchIDs) : SelectQuery

Child tables should override for custom branch relationships.

Parameters
$query : SelectQuery

The query to modify

$branchIDs : array<string|int, int>

Authorized branch IDs

Return values
SelectQuery

Query with branch filtering

afterDelete()

After delete hook to capture impersonation audit trail entries.

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

Delete event

$entity : EntityInterface

Entity being deleted

$options : ArrayObject

Delete options

afterSave()

After-save handler for automatic cache invalidation.

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

The afterSave event

$entity : EntityInterface

The saved entity

$options : ArrayObject

Save options

get()

public get(mixed $primaryKey[, array<string|int, mixed>|string $finder = = '\'all\'' ][, CacheInterface|string|null $cache = = 'null' ][, Closure|string|null $cacheKey = = 'null' ], mixed ...$args) : ActivityGroup
Parameters
$primaryKey : mixed
$finder : array<string|int, mixed>|string = = '\'all\''
$cache : CacheInterface|string|null = = 'null'
$cacheKey : Closure|string|null = = 'null'
$args : mixed
Return values
ActivityGroup

initialize()

Initialize method - configures table associations and behaviors.

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

The configuration for the Table

newEntity()

public newEntity(array<string|int, mixed> $data[, array<string|int, mixed> $options = = '[]' ]) : ActivityGroup
Parameters
$data : array<string|int, mixed>
$options : array<string|int, mixed> = = '[]'
Return values
ActivityGroup

save()

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

validationDefault()

Default validation rules for activity group data integrity.

public validationDefault(Validator $validator) : Validator
Parameters
$validator : Validator

Validator instance for rule configuration

Return values
Validator

Configured validator with activity group rules

logImpersonationAction()

Record impersonated writes to audit log table.

protected logImpersonationAction(string $defaultOperation, EntityInterface $entity) : void
Parameters
$defaultOperation : string

Operation fallback (save/delete)

$entity : EntityInterface

Affected entity


        
On this page

Search results