Slides from the Entities presentation

Events happening in the community are now at Drupal community events on www.drupal.org.
NealB-1's picture

Here are my slides (as a PDF).

Another really useful thing that the EntityAPI does for your entity is add integration with Views, Features, and Rules. I haven't played with these capabilities yet, but I'm sure it's easier than learning how to code to each of those modules' individual APIs.

Entity types in core:

Entity Fieldable? Bundles Can add more bundles?
file N file (default, not used) No
node Y article, page Yes. Add content types.
taxonomy_term Y tags Yes. One is added for each vocabulary.
taxonomy_vocabulary N taxonomy_vocabulary (default, not used) No
user Y user (default) No
comment Y article, page Yes. One is added for each content type.

Every entity has at least one bundle, because it's automatically added by entity_get_info() in common.inc, but if fieldable is FALSE, the bundle is not used for anything. The core subsystems are not as cleanly separated as I described them. There is a small amount of field and bundle code outside the field module, and some of the default controller functionality is not inside DrupalDefaultEntityController. In practice, you should be able to treat the subsystems as if they were fully separate.

AttachmentSize
Drupal 7 Entities.pdf425.67 KB

Comments

Thanks, Neal!

kathyh's picture

Thanks for the presentation and posting the slides. Entities was a big bullet point in the changes for Drupal 7 and your presentation really helped me learn more about the details of entities. Thanks again.

I second that

christophweber's picture

I second that. Entities has appeared on my radar for a while but remained obscure. Not anymore.
Thanks!

--
Christoph Weber

Awesome! You're welcome.

NealB-1's picture

Awesome! You're welcome.

Cross posted to North SD DUG

christophweber's picture

I took the liberty to cross post this discussion to the North county group, as I am sure a lot of our friends up there can benefit. Enjoy!

--
Christoph Weber

San Diego DUG

Group categories

Event Classifications

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week