Plugins provide a nice object-oriented way for modules to add functionality.  They're used to created field types, blocks, render elements, navigation items, image manipulation effects and many other useful things.  In this session, we'll look at the pieces of the plugin API, some plugins in the real world, and implement some example plugins to hopefully give you an idea how you can use plugins to make Drupal do more of what you want it to do.

This session is intended primarily for module developers, but, since plugins include render elements, they're useful for themers, too.

 

Example code, incomplete as it is, is available at https://github.com/bgbohling/drupalcamp

Important!  The presentation and slides claim you can get a working instance of a plug by calling $plugin_manager->getDefinition(PLUGIN ID). This is not correct.  To get a working instance, you need to call $plugin_manager->createInstance(PLUGIN ID).

Sponsors