Commit 55bd2327 authored by alexpott's avatar alexpott
Browse files

Issue #1969388 by dawehner, tim.plunkett, olli: Add dedicated annotations for Views plugins.

parent 28f1ad6a
......@@ -127,6 +127,9 @@ public function serialize() {
return parent::serialize();
}
/**
* {@inheritdoc}
*/
public function __destruct() {
if ($this->needsCleanup) {
$this->nextIdDelete();
......
......@@ -8,13 +8,13 @@
namespace Drupal\aggregator\Plugin\views\row;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsRow;
use Drupal\Core\Annotation\Translation;
/**
* Defines a row plugin which loads an aggregator item and renders as RSS.
*
* @Plugin(
* @ViewsRow(
* id = "aggregator_rss",
* module = "aggregator",
* theme = "views_view_row_rss",
......
......@@ -8,7 +8,7 @@
namespace Drupal\block\Plugin\views\display;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsDisplay;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\Block\ViewsBlock;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
......@@ -18,7 +18,7 @@
*
* @ingroup views_display_plugins
*
* @Plugin(
* @ViewsDisplay(
* id = "block",
* module = "block",
* title = @Translation("Block"),
......
......@@ -8,13 +8,13 @@
namespace Drupal\comment\Plugin\views\row;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsRow;
use Drupal\Core\Annotation\Translation;
/**
* Plugin which formats the comments as RSS items.
*
* @Plugin(
* @ViewsRow(
* id = "comment_rss",
* module = "comment",
* title = @Translation("Comment"),
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\wizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsWizard;
use Drupal\Core\Annotation\Translation;
/**
......@@ -18,7 +18,7 @@
/**
* Tests creating comment views with the wizard.
*
* @Plugin(
* @ViewsWizard(
* id = "comment",
* module = "comment",
* base_table = "comment",
......
......@@ -7,7 +7,7 @@
namespace Drupal\entity_reference\Plugin\views\display;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsDisplay;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
......@@ -20,7 +20,7 @@
*
* @ingroup views_display_plugins
*
* @Plugin(
* @ViewsDisplay(
* id = "entity_reference",
* title = @Translation("Entity Reference"),
* admin = @Translation("Entity Reference Source"),
......
......@@ -7,7 +7,7 @@
namespace Drupal\entity_reference\Plugin\views\row;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsRow;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\row\Fields;
......@@ -16,7 +16,7 @@
*
* @ingroup views_row_plugins
*
* @Plugin(
* @ViewsRow(
* id = "entity_reference",
* title = @Translation("Entity Reference inline fields"),
* help = @Translation("Displays the fields with an optional template."),
......
......@@ -7,7 +7,7 @@
namespace Drupal\entity_reference\Plugin\views\style;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsStyle;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\style\StylePluginBase;
......@@ -16,7 +16,7 @@
*
* @ingroup views_style_plugins
*
* @Plugin(
* @ViewsStyle(
* id = "entity_reference",
* title = @Translation("Entity Reference list"),
* help = @Translation("Returns results as a PHP array of labels and rendered rows."),
......
......@@ -8,13 +8,13 @@
namespace Drupal\file\Plugin\views\wizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsWizard;
use Drupal\Core\Annotation\Translation;
/**
* Tests creating managed files views with the wizard.
*
* @Plugin(
* @ViewsWizard(
* id = "file_managed",
* module = "file",
* base_table = "file_managed",
......
......@@ -7,7 +7,7 @@
namespace Drupal\node\Plugin\views\argument_default;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsArgumentDefault;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase;
......@@ -16,7 +16,7 @@
*
* This plugin actually has no options so it odes not need to do a great deal.
*
* @Plugin(
* @ViewsArgumentDefault(
* id = "node",
* module = "node",
* title = @Translation("Content ID from URL")
......
......@@ -7,14 +7,14 @@
namespace Drupal\node\Plugin\views\argument_validator;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsArgumentValidator;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase;
/**
* Validate whether an argument is an acceptable node.
*
* @Plugin(
* @ViewsArgumentValidator(
* id = "node",
* module = "node",
* title = @Translation("Content")
......
......@@ -7,7 +7,7 @@
namespace Drupal\node\Plugin\views\row;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsRow;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\row\RowPluginBase;
......@@ -15,7 +15,7 @@
* Plugin which performs a node_view on the resulting object
* and formats it as an RSS item.
*
* @Plugin(
* @ViewsRow(
* id = "node_rss",
* title = @Translation("Content"),
* help = @Translation("Display the content with standard node view."),
......
......@@ -8,7 +8,7 @@
namespace Drupal\node\Plugin\views\wizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsWizard;
use Drupal\Core\Annotation\Translation;
/**
......@@ -18,14 +18,13 @@
/**
* Tests creating node views with the wizard.
*
* @Plugin(
* @ViewsWizard(
* id = "node",
* module = "node",
* base_table = "node",
* title = @Translation("Content")
* )
*/
class Node extends WizardPluginBase {
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\node\Plugin\views\wizard;
use Drupal\views\Plugin\views\wizard\WizardPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsWizard;
use Drupal\Core\Annotation\Translation;
/**
......@@ -18,7 +18,7 @@
/**
* Tests creating node revision views with the wizard.
*
* @Plugin(
* @ViewsWizard(
* id = "node_revision",
* module = "node",
* base_table = "node_field_revision",
......
......@@ -7,7 +7,7 @@
namespace Drupal\php\Plugin\views\argument_default;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsArgumentDefault;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase;
......@@ -15,7 +15,7 @@
/**
* Default argument plugin to provide a PHP code block.
*
* @Plugin(
* @ViewsArgumentDefault(
* id = "php",
* module = "php",
* title = @Translation("PHP Code")
......
......@@ -7,7 +7,7 @@
namespace Drupal\php\Plugin\views\argument_validator;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsArgumentValidator;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\argument_validator\ArgumentValidatorPluginBase;
......@@ -15,7 +15,7 @@
/**
* Provide PHP code to validate whether or not an argument is ok.
*
* @Plugin(
* @ViewsArgumentValidator(
* id = "php",
* module = "php",
* title = @Translation("PHP Code")
......
......@@ -7,7 +7,8 @@
namespace Drupal\rest\Plugin\views\display;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsDisplay;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\ContentNegotiation;
use Drupal\views\ViewExecutable;
......@@ -22,7 +23,7 @@
*
* @ingroup views_display_plugins
*
* @Plugin(
* @ViewsDisplay(
* id = "rest_export",
* module = "rest",
* title = @Translation("REST export"),
......
......@@ -9,7 +9,7 @@
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsRow;
use Drupal\Core\Annotation\Translation;
/**
......@@ -17,7 +17,7 @@
*
* @ingroup views_row_plugins
*
* @Plugin(
* @ViewsRow(
* id = "data_entity",
* module = "rest",
* title = @Translation("Entity"),
......
......@@ -10,7 +10,7 @@
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\row\RowPluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsRow;
use Drupal\Core\Annotation\Translation;
/**
......@@ -18,7 +18,7 @@
*
* @ingroup views_row_plugins
*
* @Plugin(
* @ViewsRow(
* id = "data_field",
* module = "rest",
* title = @Translation("Fields"),
......
......@@ -10,7 +10,7 @@
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\style\StylePluginBase;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Annotation\ViewsStyle;
use Drupal\Core\Annotation\Translation;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Serializer\SerializerInterface;
......@@ -20,7 +20,7 @@
*
* @ingroup views_style_plugins
*
* @Plugin(
* @ViewsStyle(
* id = "serializer",
* module = "rest",
* title = @Translation("Serializer"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment