OOP Is Nothing To Be Afraid Of


All the talk of Object Oriented Programming changes in Drupal 8, Namespaces, Interfaces, and Dependency Injection, can sound complex and scary but doesn't have to be.

This session will walk through the basic syntax of writing classes, understanding visibility, moving your code out of functions in the .module file, organizing into namespaces, and how extending Drupal 8's common base classes works.  Patterns will be related to the familiar practices of Drupal 7, and describe the advantages of transitioning to OOP.

Attendees should already have an understanding of writing functions for Drupal 7 modules and themes, and should walk out with an understanding of the components necessary to build and improve Drupal 8 modules and themes.

Session Track


Experience Level


Drupal Version

When & Where

Wednesday, 11 May, 2016 - 15:45 to 16:45
263 [Phase2]