Your first Drupal 8 module, as presented at OxDUG

Last week, at February's meetup of the Oxford Drupal Users Group, I presented a simple guide to writing your first Drupal 8 module. D8's APIs have mostly settled down now (at least, the fundamentals, and I have a hard time keeping up with the details!) so it's a good time to start looking at how you'd (re-)build functionality in the forthcoming full release.

My talk wasn't really original, but intended to provide a step-by-step walkthrough for:

  1. Converting 7.x modules to 8.x, immediately followed by
  2. Form API in Drupal 8, to show how easy it is to create forms.

With that in mind, here in reverse order are my steps: a series of commits walking through creating a D8 module, adding a page callback, and adding a form callback with validation and submit behaviours. If you've not played with D8 yet, you should definitely this for yourself! I've even just added a LICENSE.txt so you're not afraid to do so. Go!

Add new comment