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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chr.fritsch created an issue. See original summary.

chr.fritsch’s picture

Status: Active » Needs review
FileSize
1.46 KB

Here is the initial patch

chr.fritsch’s picture

Issue summary: View changes
tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Not 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.

phenaproxima’s picture

+1 for RTBC. Reuse and simplification for the win!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 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.

  • alexpott committed 16c5a8f on 8.4.x
    Issue #2879959 by chr.fritsch: Media should extend...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.