Adding the interface for the entity class will allow other projects to use that to write more extensible OOP.

Patch attached.

CommentFileSizeAuthor
#2 2420551_entity_2.patch10.92 KBe0ipso
#1 2420551_entity_1.patch10.73 KBe0ipso
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

e0ipso’s picture

FileSize
10.73 KB
e0ipso’s picture

FileSize
10.92 KB

Sorry, the wrapper() method was missing in the interface.

New patch.

plopesc’s picture

Status: Active » Reviewed & tested by the community

This request sounds very useful.

In https://github.com/Plug-Drupal/plug_config and some other projects we are extracting manually this interface to use it. Would be great if you could provide it in entity module out of the box.

Thank you

David Hernández’s picture

+1

I'm working with custom Entities and this will be really helpful.

Saphyel’s picture

Thanks e0ipso! I need this feature for one of my project!

fago’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, improved the interface docs slightly and committed it.

  • e0ipso authored a2bce8f on 7.x-1.x
    Issue #2420551 by e0ipso, fago: Add EntityInterface to allow programming...

Status: Fixed » Closed (fixed)

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