Module Development

Plugin Factories and Mappers for Drupal 8, 9, and 10

Learn how the Plugin API takes a given plugin ID and uses it to instantiate and return a fully configured plugin object. In this tutorial we'll look at:

  • What factories are, and the role they serve in the Plugin API
  • The factories available in core
  • Using mappers to dynamically load a plugin when you don't know the ID of the specific plugin you need.

Drupal Module Development