Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Currently the Media entity extends RevisionableContentEntityBase and already uses EntityChangedTrait and EntityPublishedTrait.
Since we have EditorialContentEntityBase in core, which also uses these traits, there is IMHO no reason why media should not extend from that too.
Proposed resolution
Let the media entity extend from EditorialContentEntityBase
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | media_should_extend-2879959-2.patch | 1.46 KB | chr.fritsch |
Comments
Comment #2
chr.fritschHere is the initial patch
Comment #3
chr.fritschComment #4
tstoecklerNot that you aren't great at rolling ~300KB patches, but it's nice to be able to see you working on some smaller ones now ;-)
Looks perfect to me.
Comment #5
phenaproxima+1 for RTBC. Reuse and simplification for the win!
Comment #6
alexpottCommitted 16c5a8f and pushed to 8.4.x. Thanks!
Makes sense. This also means that Media entities get \Drupal\Core\Entity\RevisionLogEntityTrait which brings yet more consistency.