$journal
$journal : \Drupal\strata\Journal\JournalInterface
Records entity creates, updates and deletes as they happen.
The three hooks fire after the entity storage has committed, so what is captured is what the site now holds rather than what a save intended. The previous version comes from the entity's own original, which is already in memory, so an update costs a comparison rather than a second read.
A capture never breaks a save. Everything here runs inside someone's request, and a backup that takes the site down when its bucket is unreachable is worse than a missing backup, so every hook catches, records a finding, and returns. The reconciler notices the gap on the next pass.
$journal : \Drupal\strata\Journal\JournalInterface
$scope : \Drupal\strata\Capture\CaptureScope
__construct(\Drupal\strata\Journal\JournalInterface $journal, \Drupal\strata\Capture\CaptureScope $scope, \Drupal\Core\Session\AccountProxyInterface $currentUser, \Psr\Log\LoggerInterface $logger, string $requestId = '') : mixed
Constructs the capture.
| \Drupal\strata\Journal\JournalInterface | $journal | Where operations are appended. |
| \Drupal\strata\Capture\CaptureScope | $scope | Decides what is captured. |
| \Drupal\Core\Session\AccountProxyInterface | $currentUser | Attributes an operation to whoever caused it. |
| \Psr\Log\LoggerInterface | $logger | Records a capture that failed. |
| string | $requestId | Groups every operation captured in one request. |
onDelete(\Drupal\Core\Entity\EntityInterface $entity) : void
Records a removed entity.
A delete carries no payload: the value is whatever the previous commit already holds, and a restore reaches it by walking back rather than by reading it here.
| \Drupal\Core\Entity\EntityInterface | $entity | The entity that was deleted. |
capture(\Drupal\Core\Entity\EntityInterface $entity, \Drupal\strata\Journal\Verb $verb, \Drupal\Core\Entity\EntityInterface|null $original) : void
Appends one entity operation.
| \Drupal\Core\Entity\EntityInterface | $entity | The entity. |
| \Drupal\strata\Journal\Verb | $verb | What happened to it. |
| \Drupal\Core\Entity\EntityInterface|null | $original | The previous version, for an update. |
appendLoginEvent(\Drupal\Core\Entity\EntityInterface $entity) : void
Appends a compact login event instead of a full field delta.
Access-timestamp churn is two thirds of a Drupal site's write volume and restoring an old value would misreport an active account as dormant. The event keeps the security trail - who was seen, and when - at a fraction of the size, and carries no payload to restore.
| \Drupal\Core\Entity\EntityInterface | $entity | The user whose access timestamps moved. |
label(\Drupal\Core\Entity\EntityInterface $entity, \Drupal\strata\Journal\Verb $verb) : string
The human label recorded with an operation.
| \Drupal\Core\Entity\EntityInterface | $entity | The entity. |
| \Drupal\strata\Journal\Verb | $verb | What happened to it. |
A label for the timeline.