The Denver Drupal Meetup
Hosted by Colorado Drupal Meetups
Details
Prior to Drupal 8, the most common way that a developer would make sure her/his module was extensible was by adding a "hook". While Drupal 8 still makes use of hooks in many places, there is a better way to do things. Actually there are two better ways to do things:
- Writing an Event
- Making your module "pluggable"
In this presentation Marc Isaacson (vegantriathlete) will give you an overview of the Plugin API. If you're looking to learn about writing an event dispatcher, you'll have to go to a different talk.
We will look at examples of plugins in Drupal core, focusing on the high level concepts that are involved. If time warrants, and there is interest, we may even look at a simple custom example.
Oh, and I will also make brief mentions of Drupal hooks and event dispatchers just as a point of reference.
Attendees of this session will leave with an understanding
- Defining a plugin manager
- Using Annotations
- Defining your plugin namespace
- Instantiating plugins
- Using config (entities) to determine which plugin to use
