SyncByActivityChange
This class check what was changed in the `activity` and try to update `uncompletedactivitytable` by this changeset without recalculate data from the DB or will return flag to recalculate.
Tags
Table of Contents
Methods
- __construct() : mixed
- activityJustUpdated() : bool
- trySynchronize() : bool
Methods
__construct()
public
__construct(ItemIdentifier $itemIdentifier, UncompletedActivityChange|null $activityChange, int $responsibleId, UncompletedActivityRepo $uncompletedActivityRepo) : mixed
Parameters
- $itemIdentifier : ItemIdentifier
- $activityChange : UncompletedActivityChange|null
- $responsibleId : int
- $uncompletedActivityRepo : UncompletedActivityRepo
activityJustUpdated()
public
activityJustUpdated(RecordDto $existedRecord) : bool
Parameters
- $existedRecord : RecordDto
Return values
booltrySynchronize()
public
trySynchronize() : bool
Return values
bool —return - false when data must be recalculated.
- true when data in the consistent state and recalculation not needed
If data can be updated from changeset it will be run
updateByActivityChange
to do it.