The wrapped entity will still need to implement the appropriate interface, but the trait will contain the method implementation using the entity view builder. It should also add some setters and getters for the view mode to use.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

e0ipso created an issue. See original summary.

e0ipso’s picture

Assigned: Unassigned » e0ipso

Starting on this.

e0ipso’s picture

I ended up putting this into the base class instead.

e0ipso’s picture

Status: Active » Needs review

  • e0ipso committed 6dcba75 on 8.x-1.x
    Issue #3134261 by e0ipso: Create a trait to make the wrapped entity...
e0ipso’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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