Problem/Motivation

Problem is that parts of the definition array for plugins can come from an annotation and there is no obvious way to find the annotation class that handles annotations for this particular plugin class.

This issue started as a proposal from YesCT. Please see her notes here: https://drupal.org/node/2078593#comment-7823555 (read below the "---- notes ----" break)

Proposed resolution

Add @see on all plugin base classes that point to the corresponding annotation class that handles annotations for this specific base class.

Here is an example for the WizardPluginBase class:

--- core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php	(date 1380272608000)
+++ core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php	(revision )
@@ -20,6 +20,8 @@
  *
  * This is a very generic Views Wizard class that can be constructed for any
  * base table.
+ *
+ * @see Drupal\views\Annotation\ViewsPluginAnnotationBase\ViewsWizard
  */
 abstract class WizardPluginBase extends PluginBase implements WizardInterface {

Remaining tasks

To be discussed.
Maybe split the ticket into multiple tickets for each plugin base class.

Plugin base classes that directly extend PuginBase:
\Drupal\Component\Plugin\ContextAwarePluginBase
\Drupal\Core\Action\ActionBase
\Drupal\Core\Menu\LocalActionBase
\Drupal\Core\Menu\LocalTaskDefault
\Drupal\Core\Plugin\ContextAwarePluginBase
\Drupal\aggregator\Plugin\AggregatorPluginSettingsBase
\Drupal\block\BlockBase
\Drupal\ckeditor\CKEditorPluginBase
\Drupal\ckeditor\Plugin\CKEditorPlugin\DrupalImageCaption
\Drupal\ckeditor_test\Plugin\CKEditorPlugin\Llama
\Drupal\edit\EditorBase
\Drupal\editor\Plugin\EditorBase
\Drupal\editor\Plugin\InPlaceEditor\Editor
\Drupal\field\Plugin\PluginSettingsBase
\Drupal\filter\Plugin\FilterBase
\Drupal\image\ImageEffectBase
\Drupal\rest\Plugin\ResourceBase
\Drupal\search\Plugin\SearchPluginBase
\Drupal\system\Plugin\ImageToolkit\GDToolkit
\Drupal\image_test\Plugin\ImageToolkit\TestToolkit
\Drupal\plugin_test\Plugin\plugin_test\mock_block\MockLayoutBlock
\Drupal\plugin_test\Plugin\plugin_test\mock_block\MockTestBlock
\Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock
\Drupal\tour\TipPluginBase
\Drupal\views\Plugin\views\HandlerBase
\Drupal\views\Plugin\views\access\AccessPluginBase
\Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase
\Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase
\Drupal\views\Plugin\views\cache\CachePluginBase
\Drupal\views\Plugin\views\display\DisplayPluginBase
\Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase
\Drupal\views\Plugin\views\exposed_form\ExposedFormPluginBase
\Drupal\views\Plugin\views\join\JoinPluginBase
\Drupal\views\Plugin\views\pager\PagerPluginBase
\Drupal\views\Plugin\views\query\QueryPluginBase
\Drupal\views\Plugin\views\row\RowPluginBase
\Drupal\views\Plugin\views\style\StylePluginBase
\Drupal\views\Plugin\views\wizard\WizardPluginBase
\Drupal\views\Tests\TestHelperPlugin

User interface changes

Does not affect UI.

API changes

No API Changes

The present issue came up while investigating another issue: https://drupal.org/node/2078593#comment-7823555

Original report by [YesCT]

The annotation comes from core/modules/views/lib/Drupal/views/Annotation/ViewsWizard.php

I wondered how I could know that, besides guessing that I should look for something that extends it...

* We thought adding a @see to all of the base classes to their annotation classes would be a good idea (and needs to be a separate issue).

Comments

Sree’s picture

Please correct me if I am wrong:
Wee need to provide the exact place of the base class's annotation class in the @see section right?

I can start out with few sections initially.

jhodgdon’s picture

I think this is an excellent idea. And yes, the full namespace of the annotation class needs to be given in @see.

jhodgdon’s picture

Status: Active » Closed (duplicate)

I think we should do this along with #2269389: [meta] Make sure plugin developer info is discoverable so I'm closing this issue as a duplicate. On that issue, we're going to make sure that the plugin base class, interface, annotation, and manager all link to each other.