Follow up to #2079245, additional tasks

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:

Remaining tasks

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

See: https://www.drupal.org/project/drupal/issues/2079245#comment-16791064

CommentFileSizeAuthor
#7 3627409-1.patch859 bytesishfaqafridi85

Issue fork drupal-3627409

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

benjas created an issue. See original summary.

benjas’s picture

Issue summary: View changes
xjm’s picture

Title: Follow-up to issue #2079245 Explain the extra items that are passed to PluginBase::__construct() in $plugin_definition » Explain the extra items that are passed to PluginBase::__construct() in the $plugin_definition array
xjm’s picture

Issue tags: +Novice

From the previous issue's comments, the provider is (e.g.) the module.

xjm’s picture

Title: Explain the extra items that are passed to PluginBase::__construct() in the $plugin_definition array » Explain the extra items that are passed to PluginBase::__construct() in the $plugin_definition array besides the plugin configuration

ishfaqafridi85 made their first commit to this issue’s fork.

ishfaqafridi85’s picture

Status: Active » Needs review
StatusFileSize
new859 bytes

Added a patch documenting the class and provider entries in the plugin definition array. PHP syntax, Composer validation, and coding standards pass.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Issue summary needs to use the standard template please

Also fixes need to be in MRs not patches for reviews.

Thanks!

joachim’s picture

> The plugin implementation definition. If this is an array,

Would need to check, but I don't think it matters whether it's an array or not.

> the plugin implementation class in the 'class' key

Again, would need to check, but I think all plugins are classes. YAML plugins get this too, though the class is usually common and defined in the manager service as a default.