model-entity1.jpg
model-entity-2.jpg

The objective of this module is to provide a model entity and entity administration interface to kick-start your entity development.

While entities in Drupal 7 are a very useful abstraction and can be great tool for suitable projects there are some challenges facing developers wanting to use them:

a. Identifying what is a suitable project for entities.
b. Figuring out what is “best practice” when it comes to entity development and quickly getting up to speed with working code.
c. Effectively integrating entities with Drupal core and modules that are entity-aware and can give you extra functionality for free.

These challenges are partially being met by:

a. The Entity API module covering a lot of the ground that the Core Entity API does not (and then some) and doing a lot of the heavy lifting when it comes to integrating with the rest of Drupal core and modules.
b. Real-life examples (Profile2, Drupal Commerce, Message) which illustrate just how entities can be used in real scenarios.

Nevertheless, putting it all together for your own specific needs is still not simple and identifying “best practice” way of doing that is not clear.

This module aims to address this need by providing a fully functional implementation of a generic Entity and Entity Administration interface that you can use to kickstart your own project.

The project came out of my own need to develop a couple of modules that use entities and its first iteration borrows heavily from existing approaches in Profile2 and Drupal Commerce - the modules I studied to figure out what best practice might be.

It is not envisioned that you will use this module as is but that rather you will take the code and change it where required to fit your needs. In this respect it is very similar to the fantastic Examples for Developers project.

Organizational concerns
1. I did consider whether this module would be more suitable in the Example for Developers project but it makes use of functionality outside of core which excludes it.
2. I also considered whether it would be better to submit this as a patch to the example contained within the EntityAPI module - however the aim is larger than demonstrating how the Entity API works and it allows this to develop independently and potentially even not use the Entity module - as unlikely as that is right now!.

Project Information

Downloads