The parts of Drupal 8 and object-oriented programming that aren't being explained

davidhernandez

Drupal 8 has brought OOP (object-oriented programming) to Drupal module development, and while you can find plenty of tutorials and sessions on OOP basics, there are lots of things you've encountered that still look like magic. Let's spend some time going over code you've just copy-and-pasted, and understand why it works.

Some topics I'd like to go over:

  • namespacing
  • autoloader
  • late static bindings and the magical "dependency injection"
  • base classes and inheritance
  • clues to look for in code to help understand how to use the API/framework
  • interfaces and type hinting 
AUDIENCE
Intermediate
SCHEDULE INFO
2019
Proposed
Coding and Development