As a prequel toNode entity should implement RevisionLogInterface.
I did start working on a patch, to make Node and BlockContent extend RevisionableContentEntityBase, but there is one big flaw. Node and BlockContent entities currently define similar fields to RevisionLogEntityTrait but use different names. If we wanted to do this there would've been three options:
- Within Node and BlockContent update alter the field definitions set by RevisionLogEntityTrait.
This is what I have done in the patch but it causes the getters and setters in RevisionLogEntityTrait not to work because they use a different name.
- Introduce revision_created, revision_user, and revision_log_message entity keys, use these in RevisionLogEntityTrait instead of hardcoding field names.
We already do this for many other fields.
- Update RevisionLogEntityTrait to use the field names already used in Node and BlockContent.
I don't understand why this wasn't done in the first place.
Instead I am just going to get Node and Block content to implement RevisionLogInterface. Starting with Node.