2. About me
• Bram Goffings
@aspilicious
• Drupal developer
• Work for Nascom
www.nascom.be
• Maintainer of Display Suite
• Drupal 8 core contributor
3. Target audience
• Site builders & module developers
• Experience with module development
• Understanding of the hook system
• Know how to handle object oriented code
8. • I want to choose my favorite car on my profile from
a predefined list.
• It should be possible to plug in different cars into
the list.
• The name and an image of the selected car should
placed on the homepage.
16. What is a plugin?
Plugins are small pieces of functionality that are
swappable.
Plugins that perform similar functionality are of the
same plugin type.
17. Field widget plugins!
• There is a “widget” plugin type!
• Each field widget is from that type!
24. PSR-0
• Aims to provide a standard file, class and namespace
convention to allow plug-and-play code.
• Uses the defined namespaces to automatically load files when
needed.
• One on one mapping between namespaces and directory
structure.
27. PSR-4
• “New standard”
• Makes alternative mapping possible
• Drupal will use it to remove “unneeded” folders. The empty
*drupal* and *module-name* folder won’t be needed
anymore.
28. Let’s recap
• We know how to find plugins
• We understand namespaces and the directory
structure
• We understand PSR-0 and the difference between
PSR-4
73. Let’s recap
• We figured out how to add a function to a plugin
• We know how to create a plugin instance
• We saw how we should create our routes
• We learned how to build a page controller