RecordChangeLogger
class RecordChangeLogger implements RecordChangeWriterInterface (View source)
Writes before/after record and zone snapshots to log_record_changes, grouped into log_changesets rows.
Constants
| ACTION_RECORD_CREATE |
|
| ACTION_RECORD_EDIT |
|
| ACTION_RECORD_DELETE |
|
| ACTION_ZONE_CREATE |
|
| ACTION_ZONE_DELETE |
|
| ACTION_ZONE_METADATA_EDIT |
|
| private MAX_FIELD_LENGTH |
|
| private MAX_SNAPSHOT_LENGTH |
|
| private MAX_COMMENT_LENGTH |
|
Methods
Run $work with every change it logs grouped under one changeset carrying the given reason. Pass $zoneId only when the whole scope belongs to one zone; a cross-zone submission leaves it null and the per-change rows carry the truth.
No description
Drops any open scope. Tests only - the static state would otherwise leak between them.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
__construct(PDO $db, ConfigurationInterface $config, ActorInterface $actor)
No description
mixed
withChangeset(int|null $zoneId, string|null $comment, callable $work)
Run $work with every change it logs grouped under one changeset carrying the given reason. Pass $zoneId only when the whole scope belongs to one zone; a cross-zone submission leaves it null and the per-change rows carry the truth.
bool
changeCommentRequired()
No description
static void
resetChangesetScope()
Drops any open scope. Tests only - the static state would otherwise leak between them.
void
logRecordCreate(array $afterRecord, int|null $zoneId)
No description
void
logRecordEdit(array $beforeRecord, array $afterRecord, int $zoneId)
No description
void
logRecordDelete(array $beforeRecord, int|null $zoneId)
No description
void
logZoneCreate(array $zoneData)
No description
void
logZoneDelete(array $zoneData, int $recordCount)
No description
void
logZoneMetadataEdit(array $beforeZone, array $afterZone)
No description
static array
normalizeMetadataRows(array $rows)
No description
int
countFiltered(array $filters)
No description
array
getFiltered(array $filters, int $limit, int $offset)
No description
array
getDistinctActions()
No description
array
getDistinctUsers()
No description