Commit 13bd2b25 authored by catch's avatar catch

Issue #1849752 by effulgentsia, Berdir, jibran, neclimdul: Abstract...

Issue #1849752 by effulgentsia, Berdir, jibran, neclimdul: Abstract non-Drupal-specific parts of AnnotatedClassDiscovery into a Drupal\Component base class.
parent 62e136a3
<?php
/**
* @file
* Definition of Drupal\Core\Annotation\Plugin.
*/
namespace Drupal\Core\Annotation;
use Drupal\Component\Annotation\Plugin as ComponentPlugin;
/**
* Defines a Plugin annotation object.
*
* @Annotation
*/
class Plugin extends ComponentPlugin {
}
......@@ -42,7 +42,7 @@ function __construct($owner, $type, array $root_namespaces = array()) {
foreach ($root_namespaces as $namespace => $dir) {
$plugin_namespaces["$namespace\\Plugin\\{$owner}\\{$type}"] = array($dir);
}
parent::__construct($plugin_namespaces, $annotation_namespaces, 'Drupal\Core\Annotation\Plugin');
parent::__construct($plugin_namespaces, $annotation_namespaces);
}
}
......@@ -8,7 +8,7 @@
namespace Drupal\Core\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
......
......@@ -8,7 +8,7 @@
namespace Drupal\Core\Plugin\Validation\Constraint;
use Symfony\Component\Validator\Constraint;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Plugin\Validation\Constraint;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Symfony\Component\Validator\Constraints\Length;
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Plugin\Validation\Constraint;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Symfony\Component\Validator\Constraints\Type as SymfonyConstraint;
......
......@@ -7,7 +7,7 @@
namespace Drupal\Core\Plugin\Validation\Constraint;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Symfony\Component\Validator\Constraints\Range;
......
......@@ -7,7 +7,7 @@
namespace Drupal\action\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\system\Plugin\views\field\BulkFormBase;
/**
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityNG;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityNG;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -9,7 +9,7 @@
use Drupal\aggregator\Plugin\FetcherInterface;
use Drupal\aggregator\Plugin\Core\Entity\Feed;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Guzzle\Http\Exception\BadResponseException;
......
......@@ -8,7 +8,7 @@
namespace Drupal\aggregator\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\aggregator\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityNG;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\custom_block\Plugin\Core\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\custom_block\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\block\Plugin\Core\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\Component\Plugin\Exception\PluginException;
......
......@@ -7,7 +7,7 @@
namespace Drupal\block\Plugin\system\plugin_ui;
use Drupal\system\Plugin\PluginUIBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\block\Plugin\views\display;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
......
......@@ -8,7 +8,7 @@
namespace Drupal\block_test\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\block_test\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\block_test\Plugin\block\block;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Provides a block to test XSS in title.
......
......@@ -8,7 +8,7 @@
namespace Drupal\book\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -13,7 +13,7 @@
use Drupal\breakpoint\InvalidBreakpointSourceException;
use Drupal\breakpoint\InvalidBreakpointSourceTypeException;
use Drupal\breakpoint\InvalidBreakpointMediaQueryException;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -10,7 +10,7 @@
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\breakpoint\InvalidBreakpointSourceException;
use Drupal\breakpoint\InvalidBreakpointSourceTypeException;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -9,7 +9,7 @@
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\editor\Plugin\Core\Entity\Editor;
......
......@@ -10,7 +10,7 @@
use Drupal\ckeditor\CKEditorPluginBase;
use Drupal\ckeditor\CKEditorPluginConfigurableInterface;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\editor\Plugin\Core\Entity\Editor;
......
......@@ -8,7 +8,7 @@
namespace Drupal\ckeditor\Plugin\editor\editor;
use Drupal\editor\Plugin\EditorBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\editor\Plugin\Core\Entity\Editor;
......
......@@ -9,7 +9,7 @@
use Drupal\ckeditor\CKEditorPluginInterface;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\editor\Plugin\Core\Entity\Editor;
......
......@@ -9,7 +9,7 @@
use Drupal\ckeditor\CKEditorPluginButtonsInterface;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -9,7 +9,7 @@
use Drupal\ckeditor\CKEditorPluginContextualInterface;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\editor\Plugin\Core\Entity\Editor;
......
......@@ -11,7 +11,7 @@
use Drupal\ckeditor\CKEditorPluginContextualInterface;
use Drupal\ckeditor\CKEditorPluginConfigurableInterface;
use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\editor\Plugin\Core\Entity\Editor;
......
......@@ -9,7 +9,7 @@
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityNG;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\block\block;
use Drupal\block\BlockBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
/**
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\entity_reference\selection;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Database\Query\SelectInterface;
use Drupal\entity_reference\Plugin\entity_reference\selection\SelectionBase;
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\argument;
use Drupal\views\Plugin\views\argument\ArgumentPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Argument handler to accept a user id to check for nodes that
......
......@@ -10,7 +10,7 @@
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to allow linking to a comment.
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
use Drupal\views\Plugin\views\field\FieldPluginBase;
/**
......
......@@ -10,7 +10,7 @@
use Drupal\views\Plugin\views\field\Date;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ViewExecutable;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to display the timestamp of a comment with the count of comments.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Base field handler to present a link.
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Provides a comment approve link.
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to present a link to delete a node.
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to present a link node edit.
......
......@@ -7,7 +7,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to present a link to delete a node.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to present the name of the last comment poster.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\Date;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to display the newer of last comment / node updated.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Display node comment status.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\field;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Handler for showing comment module's node link.
......
......@@ -10,7 +10,7 @@
use Drupal\views\Plugin\views\field\Numeric;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\ViewExecutable;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to display the number of new comments.
......
......@@ -10,7 +10,7 @@
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Field handler to allow linking to a user account or homepage.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\Date;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Filter handler for the newer of last comment / node updated.
......
......@@ -8,7 +8,7 @@
namespace Drupal\comment\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\InOperator;
use Drupal\Core\Annotation\Plugin;
use Drupal\Component\Annotation\Plugin;
/**
* Filter based on comment node status.
......