Custom hook implementations, Ctools plugins, or simply no extensibility at all. We’ve all faced the challenges that needed to be overcome in order to make Drupal modules extensible by others. Drupal 8 introduces the plugin system: a unified approach to discover and instantiate plugins, with a variety of options to customize your own plugin type using different discovery methods and plugin features. Because good ideas never stop, but Drupal 8 had to enter feature freeze at some point, the contributed Plugin module has become an incubator for additional features that will be submitted for inclusion in minor Drupal 8 releases. We will take a look at how Drupal historically tried to solve pluggability, and how Drupal 8 and the contributed Plugin module do it now.
The examples come straight out of Drupal 8, and we'll demonstrate how to write a plugin live on stage. By attending this session, you will learn about:
- How Drupal core and contributed modules use the plugin system
- The available plugin discovery methods
- Plugin instantiation
- The available features plugin types can provide out of the box
- How to write plugins
- How the Plugin module complements Drupal core
- Which plugin types and plugins are provided by Drupal core