CHANGED
CHANGED = 'changed'
The field exists in both and differs.
What changed in one field, setting or column, between two points in time.
A field is either scalar or it is not, and the two want different renderings: a title going from
one string to another is a single line, and a body going from one paragraph to another is a run of
hunks. Both are carried here so the renderer picks rather than guesses, and isTextual() is the
question it asks.
The rendered values are kept alongside the hunks because a field that was added or removed has only one side, and asking a line-level diff to represent "this did not exist" produces a hunk of every line rather than the one fact that matters.
__construct(string $name, string $status, string $before = '', string $after = '', list<\Drupal\strata\Diff\DiffHunk> $hunks = []) : mixed
Constructs a field diff.
| string | $name | The field, setting or column name. |
| string | $status | One of CHANGED, ADDED or REMOVED. |
| string | $before | The earlier value, rendered. |
| string | $after | The later value, rendered. |
| list<\Drupal\strata\Diff\DiffHunk> | $hunks | Line-level hunks, empty for a value that is not worth diffing by line. |