explain the extra items that are passed to PluginBase::__construct() in $plugin_definition

Created on 2 September 2013, about 11 years ago
Updated 27 February 2023, over 1 year ago

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Plug...

From what I can tell, the $plugin_definition parameter gets a couple of extra items in its array that are not in the annotation on the plugin:

- class: the class of the plugin
- provider: the module where the plugin is defined? or the module that defines the plugin type?

While we're at it, it would make following the pathway of plugin construction clearer if the parameters were explained with this in mind:

- $configuration is the configuration array that is passed to the plugin manager's createInstance() method
- $plugin_definition is the annotation from the top of the plugin class

🐛 Bug report
Status

Needs work

Version

9.5

Component
Documentation 

Last updated 4 days ago

No maintainer
Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024