revision_diff
class revision_diff implements JsonSerializable
Value Object: Revision Diff.
Represents a single field change (old vs new value). Corresponds to a row in 'middag_eventdiff'.
Methods
__construct(string $field_name, string|null $old_value, string|null $new_value)
No description
static revision_diff
from_state(string $field, mixed $old, mixed $new)
Creates a diff instance from raw database values or entity properties.
bool
has_changed()
Checks if there was an actual change.
array
to_array()
Export the diff as associative array.
array
jsonSerialize()
Serialize to JSON representation.
Details
at line 30
__construct(string $field_name, string|null $old_value, string|null $new_value)
No description
at line 46
static revision_diff
from_state(string $field, mixed $old, mixed $new)
Creates a diff instance from raw database values or entity properties.
Handles type conversion safely.
at line 60
bool
has_changed()
Checks if there was an actual change.
at line 70
array
to_array()
Export the diff as associative array.
at line 84
array
jsonSerialize()
Serialize to JSON representation.