Your SlideShare is downloading. ×
0
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
DrupalCamp 2011 -- Poutine Maker
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 2011 -- Poutine Maker

1,263

Published on

My DrupalCamp 2011

My DrupalCamp 2011

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,263
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
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. Poutine Maker: Custom Fields in Drupal 7 Tavish Armstrong tavish@evolvingweb.ca
  • 2. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 3. Resourceshttp://evolvingweb.ca/story/poutine-maker-introduction-field- api-drupal-7-part-1 http://drupal.org/sandbox/tarmstrong/1188140https://github.com/tarmstrong/poutine_maker
  • 4. Custom fields: What are they?• Custom fields are like a custom data type• You can also have a custom widgets, formatters, validation
  • 5. Custom Fields: What are they good for?• Drupal gives you text fields, date fields, etc.• It wont give you a colour field. Or a poutine field.• You may want multi-value with a fieldset.• Fancy widgets?• Fancy formatting?• Fancy validation?
  • 6. Colour picker widget
  • 7. Alternative: field_collectionExciting project!
  • 8. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 9. hook_field_info()
  • 10. hook_field_widget_info()
  • 11. hook_field_formatter_info()
  • 12. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 13. hook_field_widget_form()
  • 14. hook_field_widget_form()
  • 15. hook_field_widget_form()
  • 16. hook_field_widget_form()
  • 17. hook_field_widget_form()
  • 18. hook_field_widget_form()
  • 19. hook_field_widget_form()
  • 20. hook_field_widget_form()
  • 21. hook_field_is_empty()
  • 22. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 23. hook_field_schema()
  • 24. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 25. hook_field_widget_error()
  • 26. hook_field_validate()
  • 27. hook_field_widget_error()
  • 28. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 29. hook_field_formatter_view()• Take all the saved field items (i.e. each $delta) and return a renderable array for each$element[0] = array( first poutine item ... );$element[1] = array( second poutine item...);
  • 30. hook_field_formatter_view()
  • 31. poutine_maker_format_field()
  • 32. poutine_maker_format_field()
  • 33. poutine_maker_format_field()
  • 34. The finished formatter
  • 35. AgendaCustom fieldsWhat are they?What are they good for?Info() hooksCreating a widgetCreating a schemaCreating a validatorCreating a formatterDemo
  • 36. Resourceshttp://evolvingweb.ca/story/poutine-maker-introduction-field- api-drupal-7-part-1 http://drupal.org/sandbox/tarmstrong/1188140https://github.com/tarmstrong/poutine_maker
  • 37. Questions?Tavish Armstrong (tarmstrong) tavish@evolvingweb.ca

×