This site is archived. All interactive features are disabled.

Entities in Drupal 7

Knowledge level: 
Intermediate
Track: 
Coding and Development
Language: 
English

In Drupal 6 everything was a node, the latest Drupal introduced the concept of entities. Some of the features aren't used yet in the Drupal core. For example the node is missing its entity class, taxonomies still saved with drupal_write_record, etc.

I will present how to use entities to really benefit from them in a project. The presented topics will be:

  • how to declare an entity?
  • entity properties and fieldable entities
  • what is the entity class?
  • what is the entity controller class?
  • examples of using entity metadata wrapper
  • why to use entity field query instead db_select

All of the above topics will be presented with real life examples in a few lines of code.