class revision_service implements revision_service_interface

internal  
 

Revision service.

Responsible for creating historical snapshots (Revisions) of Items. This ensures that we have a full history of the item's state at any point in time.

Methods

__construct(revision_repository_interface $revision_repo)

Constructor.

void
create_revision(item_interface|null $old, item_interface|null $new)

Register a revision (snapshot) based on the operation context.

Details

at line 41
__construct(revision_repository_interface $revision_repo)

Constructor.

Parameters

revision_repository_interface $revision_repo

at line 53
void create_revision(item_interface|null $old, item_interface|null $new)

Register a revision (snapshot) based on the operation context.

Parameters

item_interface|null $old

Previous entity state (or null during creation)

item_interface|null $new

New entity state (or null during deletion)

Return Value

void

Exceptions

dml_exception