Your SlideShare is downloading. ×
Drupalcamp israel 2012
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Drupalcamp israel 2012

274
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
274
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Entities -‫מבוא ל‬ Roy Segall @RoySegallhttp://drupal.org/sandbox/RoySegall/1799834: Sandbox
  • 2. Entity
  • 3. ‫‪Entity‬‬‫ייצוג נתונים בדרופל‬
  • 4. ‫‪Entity‬‬‫ייצוג נתונים בדרופל‬ ‫"אבני הבניין"‬
  • 5. entity_type node
  • 6. entity_type nodebundle node_type .image, blog, forum etc )
  • 7. entity_type nodebundle node_type .image, blog, forum etc )entity ID 1 Node ID 1
  • 8. EntityFieldQuery examples$query = new EntityFieldQuery ();$query->entityCondition(entity_type, node);$result = $query->execute();array ( node => array (   1 => array(     nid => 1,     vid => 1,     type => article,   ), ),)
  • 9. EntityFieldQuery examples$query = new EntityFieldQuery ();  $query->entityCondition(entity_type , node);$result = $query->execute();foreach (array_keys($result[node]) as $nid) { $node = node_load($nid);}
  • 10. EntityFieldQuery examples$query = new EntityFieldQuery ();  $query->entityCondition(entity_type , node);$result = $query->execute();foreach (array_keys($result[node]) as $nid) { $node = node_load($nid);}$query = new EntityFieldQuery ();  $query->entityCondition(entity_type‘ , node‘);$result = $query->execute();$nodes = node_load_multiple (array_keys($result[node]));
  • 11. EntityFieldQuery examples$query = new EntityFieldQuery ();$result = $query ->entityCondition(entity_type, node) ->propertyCondition(title, Foo) ->fieldCondition(field_text , value, Bar) ->execute();
  • 12. Entity metatdata wrapper
  • 13. ‫‪Entity metatdata wrapper‬‬‫עריכה ושמירת שדות ו- ‪ property‬באמצעות פונקציות זהות.‬
  • 14. ‫‪Entity metatdata wrapper‬‬ ‫עריכה ושמירת שדות ו- ‪ property‬באמצעות פונקציות זהות.‬‫גישה קלה ליישויות מקושרות )באמצעות המודול ‪)Entity reference‬‬
  • 15. Entity metadata wrapper
  • 16. Entity metadata wrapper
  • 17. Entity metadata wrapper
  • 18. Entity-‫דוגמאות לשימוש ב‬ Organic groups Commerce Message
  • 19. Q&A