DrupalCafe Kyiv EntityAPI

1,367 views

Published on

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
1,367
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
10
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

DrupalCafe Kyiv EntityAPI

  1. 1. Entity API <ul>email: [email_address] twitter: ygerasimov skype: yuriy_gerasimov </ul>d.o.: http://drupal.org/user/257311
  2. 2. Agenda <ul><li>What are entities?
  3. 3. What is Entity API for?
  4. 4. hook_entity_info() to create entities
  5. 5. Code examples </li></ul>
  6. 6. What are entities? <ul><li>Entity types defined in core: nodes, users, taxomony terms, vocabularies , comments, files
  7. 7. Core functionality: </li><ul><li>Common hooks (hook_entity_load(), hook_entity_presave() …)
  8. 8. Fieldable
  9. 9. EntityFieldQuery
  10. 10. Every entity should have Controller class </li></ul></ul>
  11. 11. Entity API <ul><li>entity_load() , entity_save(), entity_create(),
  12. 12. entity_delete()
  13. 13. entity_view(), entity_access(), entity_label() ,
  14. 14. entity_uri()
  15. 15. entity_id(), entity_extract_ids()
  16. 16. entity_export(), entity_import()
  17. 17. entity_get_info() , entity_get_property_info()
  18. 18. core </li></ul>
  19. 19. Entity API metadata <ul><li>Provide property info for your entity type, to </li><ul><li>Get tokens for all properties, via entity tokens.
  20. 20. Get Views integration (as long the property has an
  21. 21. equivalent column in the base table)
  22. 22. Obtain support of modules building upon it lik </li><ul><li>Rules
  23. 23. Search API </li></ul></ul></ul>
  24. 24. Code Demo
  25. 25. Entity API revisions <ul><li>http://drupal.org/node/996696 </li></ul>
  26. 26. Documentation <ul><li>http://drupal.org/project/entity
  27. 27. Handbook: http://drupal.org/node/878784
  28. 28. http://bxl2011.drupaldays.org/node/313
  29. 29. Examples: commerce, profile2 </li></ul>
  30. 30. Entity API <ul>email: [email_address] twitter: ygerasimov skype: yuriy_gerasimov </ul>d.o.: http://drupal.org/user/257311

×