summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries2014-06-30 19:24:34 (GMT)
committerDries2014-06-30 19:24:34 (GMT)
commit41576e126fa1e9fdb2e870c46895a276953c2caf (patch)
treec3279b853338b7912e53c64d2f2b33066c41e5fc
parent6933b277673a049049b19d8dce542891f20692d6 (diff)
Issue #1875996 by Xano, tim.plunkett, neclimdul, Rajendar Reddy, Jalandhar: Reconsider naming conventions for derivative classes.
-rw-r--r--core/lib/Drupal/Component/Plugin/Derivative/DeriverBase.php (renamed from core/lib/Drupal/Component/Plugin/Derivative/DerivativeBase.php)11
-rw-r--r--core/lib/Drupal/Component/Plugin/Derivative/DeriverInterface.php (renamed from core/lib/Drupal/Component/Plugin/Derivative/DerivativeInterface.php)6
-rw-r--r--core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php2
-rw-r--r--core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php92
-rw-r--r--core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php (renamed from core/lib/Drupal/Component/Plugin/Exception/InvalidDerivativeClassException.php)6
-rw-r--r--core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php2
-rw-r--r--core/lib/Drupal/Component/Plugin/PluginBase.php2
-rw-r--r--core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php4
-rw-r--r--core/lib/Drupal/Core/Entity/Plugin/DataType/Entity.php2
-rw-r--r--core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php4
-rw-r--r--core/lib/Drupal/Core/Field/Plugin/DataType/FieldItem.php2
-rw-r--r--core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php20
-rw-r--r--core/lib/Drupal/Core/Plugin/Discovery/ContainerDeriverInterface.php (renamed from core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeInterface.php)13
-rw-r--r--core/modules/block/block.local_tasks.yml2
-rw-r--r--core/modules/block/custom_block/src/Plugin/Derivative/CustomBlock.php28
-rw-r--r--core/modules/block/src/BlockPluginInterface.php3
-rw-r--r--core/modules/block/src/BlockViewBuilder.php3
-rw-r--r--core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php6
-rw-r--r--core/modules/block/src/Tests/BlockPreprocessUnitTest.php3
-rw-r--r--core/modules/block/src/Tests/BlockTemplateSuggestionsUnitTest.php3
-rw-r--r--core/modules/block_content/src/Plugin/Block/BlockContentBlock.php2
-rw-r--r--core/modules/block_content/src/Plugin/Derivative/BlockContent.php5
-rw-r--r--core/modules/config_translation/config_translation.contextual_links.yml2
-rw-r--r--core/modules/config_translation/config_translation.local_tasks.yml2
-rw-r--r--core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationContextualLinks.php6
-rw-r--r--core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationLocalTasks.php6
-rw-r--r--core/modules/content_translation/content_translation.contextual_links.yml2
-rw-r--r--core/modules/content_translation/content_translation.local_tasks.yml2
-rw-r--r--core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php6
-rw-r--r--core/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php6
-rw-r--r--core/modules/entity_reference/src/Plugin/Derivative/SelectionBase.php4
-rw-r--r--core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php2
-rw-r--r--core/modules/field_ui/field_ui.local_tasks.yml2
-rw-r--r--core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php6
-rw-r--r--core/modules/language/src/Plugin/Block/LanguageBlock.php2
-rw-r--r--core/modules/language/src/Plugin/Derivative/LanguageBlock.php4
-rw-r--r--core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php4
-rw-r--r--core/modules/migrate/src/Plugin/Derivative/MigrateEntityRevision.php4
-rw-r--r--core/modules/migrate/src/Plugin/migrate/destination/Entity.php2
-rw-r--r--core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php2
-rw-r--r--core/modules/rest/src/Plugin/Derivative/EntityDerivative.php4
-rw-r--r--core/modules/rest/src/Plugin/rest/resource/EntityResource.php2
-rw-r--r--core/modules/search/search.local_tasks.yml2
-rw-r--r--core/modules/search/src/Plugin/Derivative/SearchLocalTask.php6
-rw-r--r--core/modules/system/src/Plugin/Block/SystemMenuBlock.php2
-rw-r--r--core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php6
-rw-r--r--core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php6
-rw-r--r--core/modules/system/system.local_tasks.yml2
-rw-r--r--core/modules/system/tests/modules/entity_test/entity_test.local_tasks.yml2
-rw-r--r--core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php4
-rw-r--r--core/modules/system/tests/modules/menu_test/menu_test.local_tasks.yml2
-rw-r--r--core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTest.php4
-rw-r--r--core/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php4
-rw-r--r--core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php12
-rw-r--r--core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php12
-rw-r--r--core/modules/views/src/Plugin/Block/ViewsBlock.php2
-rw-r--r--core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php2
-rw-r--r--core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php4
-rw-r--r--core/modules/views/src/Plugin/Derivative/ViewsBlock.php8
-rw-r--r--core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php6
-rw-r--r--core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php4
-rw-r--r--core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php8
-rw-r--r--core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php6
-rw-r--r--core/modules/views/src/Plugin/views/argument_validator/Entity.php2
-rw-r--r--core/modules/views/src/Plugin/views/row/EntityRow.php2
-rw-r--r--core/modules/views/src/Plugin/views/wizard/Standard.php2
-rw-r--r--core/modules/views/tests/src/Plugin/Derivative/ViewsLocalTaskTest.php2
-rw-r--r--core/modules/views/views.local_tasks.yml2
-rw-r--r--core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php22
-rw-r--r--core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php24
-rw-r--r--core/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php4
-rw-r--r--core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php4
74 files changed, 253 insertions, 214 deletions
diff --git a/core/lib/Drupal/Component/Plugin/Derivative/DerivativeBase.php b/core/lib/Drupal/Component/Plugin/Derivative/DeriverBase.php
index 3adc150..f989bf6 100644
--- a/core/lib/Drupal/Component/Plugin/Derivative/DerivativeBase.php
+++ b/core/lib/Drupal/Component/Plugin/Derivative/DeriverBase.php
@@ -2,20 +2,15 @@
/**
* @file
- * Contains Drupal\Component\Plugin\Derivative\DerivativeBase.
+ * Contains \Drupal\Component\Plugin\Derivative\DeriverBase.
*/
namespace Drupal\Component\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
-
/**
- * Default version of getDerivativeDefinition() common to most concrete
- * implementations of DerivativeInterface.
- *
- * See the Aggregator and Mock block derivers for different implementations.
+ * Provides a basic deriver.
*/
-abstract class DerivativeBase implements DerivativeInterface {
+abstract class DeriverBase implements DeriverInterface {
/**
* List of derivative definitions.
diff --git a/core/lib/Drupal/Component/Plugin/Derivative/DerivativeInterface.php b/core/lib/Drupal/Component/Plugin/Derivative/DeriverInterface.php
index e4b92b0..fe9ef40 100644
--- a/core/lib/Drupal/Component/Plugin/Derivative/DerivativeInterface.php
+++ b/core/lib/Drupal/Component/Plugin/Derivative/DeriverInterface.php
@@ -2,17 +2,17 @@
/**
* @file
- * Definition of Drupal\Component\Plugin\Derivative\DerivativeInterface.
+ * Contains \Drupal\Component\Plugin\Derivative\DeriverInterface.
*/
namespace Drupal\Component\Plugin\Derivative;
/**
- * Plugin interface for derivative plugin handling.
+ * Provides additional plugin definitions based on an existing definition.
*
* @ingroup plugin_api
*/
-interface DerivativeInterface {
+interface DeriverInterface {
/**
* Returns the definition of a derivative plugin.
diff --git a/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php b/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php
index 4dbd9d5..db2205a 100644
--- a/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php
+++ b/core/lib/Drupal/Component/Plugin/DerivativeInspectionInterface.php
@@ -18,7 +18,7 @@ interface DerivativeInspectionInterface {
* @return string
* The base_plugin_id of the plugin instance.
*/
- public function getBasePluginId();
+ public function getBaseId();
/**
* Returns the derivative_id of the plugin instance.
diff --git a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
index 4850076..53a1bef 100644
--- a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
+++ b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php
@@ -7,7 +7,7 @@
namespace Drupal\Component\Plugin\Discovery;
-use Drupal\Component\Plugin\Exception\InvalidDerivativeClassException;
+use Drupal\Component\Plugin\Exception\InvalidDeriverException;
/**
* Base class providing the tools for a plugin discovery to be derivative aware.
@@ -19,14 +19,25 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
use DiscoveryTrait;
- protected $derivativeFetchers = array();
+ /**
+ * Plugin derivers.
+ *
+ * @var \Drupal\Component\Plugin\Derivative\DeriverInterface[]
+ * Keys are base plugin IDs.
+ */
+ protected $derivers = array();
+
+ /**
+ * The decorated plugin discovery.
+ *
+ * @var \Drupal\Component\Plugin\Discovery\DiscoveryInterface
+ */
protected $decorated;
/**
- * Creates a Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator
- * object.
+ * Creates a new instance.
*
- * @param DiscoveryInterface $discovery
+ * @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface $decorated
* The parent object implementing DiscoveryInterface that is being
* decorated.
*/
@@ -37,9 +48,9 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
/**
* {@inheritdoc}
*
- * @throws \Drupal\Component\Plugin\Exception\InvalidDerivativeClassException
- * Thrown if the 'derivative' class specified in the plugin definition does
- * not implement \Drupal\Component\Plugin\Derivative\DerivativeInterface.
+ * @throws \Drupal\Component\Plugin\Exception\InvalidDeriverException
+ * Thrown if the 'deriver' class specified in the plugin definition
+ * does not implement \Drupal\Component\Plugin\Derivative\DeriverInterface.
*/
public function getDefinition($plugin_id, $exception_on_invalid = TRUE) {
// This check is only for derivative plugins that have explicitly provided
@@ -51,9 +62,9 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
list($base_plugin_id, $derivative_id) = $this->decodePluginId($plugin_id);
$base_plugin_definition = $this->decorated->getDefinition($base_plugin_id, $exception_on_invalid);
if ($base_plugin_definition) {
- $derivative_fetcher = $this->getDerivativeFetcher($base_plugin_id, $base_plugin_definition);
- if ($derivative_fetcher) {
- $derivative_plugin_definition = $derivative_fetcher->getDerivativeDefinition($derivative_id, $base_plugin_definition);
+ $deriver = $this->getDeriver($base_plugin_id, $base_plugin_definition);
+ if ($deriver) {
+ $derivative_plugin_definition = $deriver->getDerivativeDefinition($derivative_id, $base_plugin_definition);
// If a plugin defined itself as a derivative, merge in possible
// defaults from the derivative.
if ($derivative_id && isset($plugin_definition)) {
@@ -71,9 +82,9 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
/**
* {@inheritdoc}
*
- * @throws \Drupal\Component\Plugin\Exception\InvalidDerivativeClassException
- * Thrown if the 'derivative' class specified in the plugin definition does
- * not implement \Drupal\Component\Plugin\Derivative\DerivativeInterface.
+ * @throws \Drupal\Component\Plugin\Exception\InvalidDeriverException
+ * Thrown if the 'deriver' class specified in the plugin definition
+ * does not implement \Drupal\Component\Plugin\Derivative\DeriverInterface.
*/
public function getDefinitions() {
$plugin_definitions = $this->decorated->getDefinitions();
@@ -89,9 +100,9 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
protected function getDerivatives(array $base_plugin_definitions) {
$plugin_definitions = array();
foreach ($base_plugin_definitions as $base_plugin_id => $plugin_definition) {
- $derivative_fetcher = $this->getDerivativeFetcher($base_plugin_id, $plugin_definition);
- if ($derivative_fetcher) {
- $derivative_definitions = $derivative_fetcher->getDerivativeDefinitions($plugin_definition);
+ $deriver = $this->getDeriver($base_plugin_id, $plugin_definition);
+ if ($deriver) {
+ $derivative_definitions = $deriver->getDerivativeDefinitions($plugin_definition);
foreach ($derivative_definitions as $derivative_id => $derivative_definition) {
$plugin_id = $this->encodePluginId($base_plugin_id, $derivative_id);
// Use this definition as defaults if a plugin already defined
@@ -155,52 +166,51 @@ class DerivativeDiscoveryDecorator implements DiscoveryInterface {
}
/**
- * Finds a Drupal\Component\Plugin\Discovery\DerivativeInterface.
- *
- * This Drupal\Component\Plugin\Discovery\DerivativeInterface can fetch
- * derivatives for the plugin.
+ * Gets a deriver for a base plugin.
*
* @param string $base_plugin_id
* The base plugin id of the plugin.
* @param mixed $base_definition
* The base plugin definition to build derivatives.
*
- * @return \Drupal\Component\Plugin\Derivative\DerivativeInterface|null
+ * @return \Drupal\Component\Plugin\Derivative\DeriverInterface|null
* A DerivativeInterface or NULL if none exists for the plugin.
*
- * @throws \Drupal\Component\Plugin\Exception\InvalidDerivativeClassException
- * Thrown if the 'derivative' class specified in the plugin definition does
- * not implement \Drupal\Component\Plugin\Derivative\DerivativeInterface.
+ * @throws \Drupal\Component\Plugin\Exception\InvalidDeriverException
+ * Thrown if the 'deriver' class specified in the plugin definition
+ * does not implement \Drupal\Component\Plugin\Derivative\DeriverInterface.
*/
- protected function getDerivativeFetcher($base_plugin_id, $base_definition) {
- if (!isset($this->derivativeFetchers[$base_plugin_id])) {
- $this->derivativeFetchers[$base_plugin_id] = FALSE;
- $class = $this->getDerivativeClass($base_definition);
+ protected function getDeriver($base_plugin_id, $base_definition) {
+ if (!isset($this->derivers[$base_plugin_id])) {
+ $this->derivers[$base_plugin_id] = FALSE;
+ $class = $this->getDeriverClass($base_definition);
if ($class) {
- $this->derivativeFetchers[$base_plugin_id] = new $class($base_plugin_id);
+ $this->derivers[$base_plugin_id] = new $class($base_plugin_id);
}
}
- return $this->derivativeFetchers[$base_plugin_id] ?: NULL;
+ return $this->derivers[$base_plugin_id] ?: NULL;
}
/**
- * Get the derivative class name from the base plugin definition.
+ * Get the deriver class name from the base plugin definition.
*
* @param array $base_definition
* The base plugin definition to build derivatives.
*
- * @return string|NULL
- * The name of a class implementing \Drupal\Component\Plugin\Derivative\DerivativeInterface.
+ * @return string|null
+ * The name of a class implementing
+ * \Drupal\Component\Plugin\Derivative\DeriverInterface.
*
- * @throws \Drupal\Component\Plugin\Exception\InvalidDerivativeClassException
- * Thrown if the 'derivative' class specified in the plugin definition does
- * not implement \Drupal\Component\Plugin\Derivative\DerivativeInterface.
+ * @throws \Drupal\Component\Plugin\Exception\InvalidDeriverException
+ * Thrown if the 'deriver' class specified in the plugin definition
+ * does not implement
+ * \Drupal\Component\Plugin\Derivative\DerivativeInterface.
*/
- protected function getDerivativeClass($base_definition) {
+ protected function getDeriverClass($base_definition) {
$class = NULL;
- if ((is_array($base_definition) || ($base_definition = (array) $base_definition)) && (isset($base_definition['derivative']) && $class = $base_definition['derivative'])) {
- if (!is_subclass_of($class, '\Drupal\Component\Plugin\Derivative\DerivativeInterface')) {
- throw new InvalidDerivativeClassException(sprintf('Plugin (%s) derivative class "%s" has to implement interface \Drupal\Component\Plugin\Derivative\DerivativeInterface', $base_definition['id'], $class));
+ if ((is_array($base_definition) || ($base_definition = (array) $base_definition)) && (isset($base_definition['deriver']) && $class = $base_definition['deriver'])) {
+ if (!is_subclass_of($class, '\Drupal\Component\Plugin\Derivative\DeriverInterface')) {
+ throw new InvalidDeriverException(sprintf('Plugin (%s) deriver "%s" must implement \Drupal\Component\Plugin\Derivative\DeriverInterface', $base_definition['id'], $class));
}
}
return $class;
diff --git a/core/lib/Drupal/Component/Plugin/Exception/InvalidDerivativeClassException.php b/core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php
index e3f7ed0..4aab380 100644
--- a/core/lib/Drupal/Component/Plugin/Exception/InvalidDerivativeClassException.php
+++ b/core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php
@@ -1,12 +1,12 @@
<?php
/**
* @file
- * Definition of \Drupal\Component\Plugin\Exception\InvalidDerivativeClassException.
+ * Definition of \Drupal\Component\Plugin\Exception\InvalidDeriverClassException.
*/
namespace Drupal\Component\Plugin\Exception;
/**
- * Exception to be thrown if a plugin tries to use an invalid derivative class.
+ * Exception to be thrown if a plugin tries to use an invalid deriver.
*/
-class InvalidDerivativeClassException extends PluginException { }
+class InvalidDeriverException extends PluginException { }
diff --git a/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php b/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
index cc81f58..337e503 100644
--- a/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
+++ b/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php
@@ -8,7 +8,7 @@ namespace Drupal\Component\Plugin\Factory;
use Drupal\Component\Plugin\Discovery\DiscoveryInterface;
use Drupal\Component\Plugin\Exception\PluginException;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverInterface;
/**
* Default plugin factory.
diff --git a/core/lib/Drupal/Component/Plugin/PluginBase.php b/core/lib/Drupal/Component/Plugin/PluginBase.php
index beac3e9..aeff157 100644
--- a/core/lib/Drupal/Component/Plugin/PluginBase.php
+++ b/core/lib/Drupal/Component/Plugin/PluginBase.php
@@ -70,7 +70,7 @@ abstract class PluginBase implements PluginInspectionInterface, DerivativeInspec
/**
* {@inheritdoc}
*/
- public function getBasePluginId() {
+ public function getBaseId() {
$plugin_id = $this->getPluginId();
if (strpos($plugin_id, static::DERIVATIVE_SEPARATOR)) {
list($plugin_id) = explode(static::DERIVATIVE_SEPARATOR, $plugin_id, 2);
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
index 214a63a..dc54e75 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/Deriver/EntityDeriver.php
@@ -8,13 +8,13 @@
namespace Drupal\Core\Entity\Plugin\DataType\Deriver;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides data type plugins for each existing entity type and bundle.
*/
-class EntityDeriver implements ContainerDerivativeInterface {
+class EntityDeriver implements ContainerDeriverInterface {
/**
* List of derivative definitions.
diff --git a/core/lib/Drupal/Core/Entity/Plugin/DataType/Entity.php b/core/lib/Drupal/Core/Entity/Plugin/DataType/Entity.php
index 785cde9..5755c51 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/DataType/Entity.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/DataType/Entity.php
@@ -17,7 +17,7 @@ namespace Drupal\Core\Entity\Plugin\DataType;
* id = "entity",
* label = @Translation("Entity"),
* description = @Translation("All kind of entities, e.g. nodes, comments or users."),
- * derivative = "\Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver",
+ * deriver = "\Drupal\Core\Entity\Plugin\DataType\Deriver\EntityDeriver",
* definition_class = "\Drupal\Core\Entity\TypedData\EntityDataDefinition"
* )
*/
diff --git a/core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php b/core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php
index 09207f1..19d44e4 100644
--- a/core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php
+++ b/core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php
@@ -8,13 +8,13 @@
namespace Drupal\Core\Field\Plugin\DataType\Deriver;
use Drupal\Core\Field\FieldTypePluginManagerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides data type plugins for each existing field type plugin.
*/
-class FieldItemDeriver implements ContainerDerivativeInterface {
+class FieldItemDeriver implements ContainerDeriverInterface {
/**
* List of derivative definitions.
diff --git a/core/lib/Drupal/Core/Field/Plugin/DataType/FieldItem.php b/core/lib/Drupal/Core/Field/Plugin/DataType/FieldItem.php
index 8f5c7d5..bcca2ec 100644
--- a/core/lib/Drupal/Core/Field/Plugin/DataType/FieldItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/DataType/FieldItem.php
@@ -18,7 +18,7 @@ namespace Drupal\Core\Field\Plugin\DataType;
* id = "field_item",
* label = @Translation("Field item"),
* list_class = "\Drupal\Core\Field\FieldItemList",
- * derivative = "Drupal\Core\Field\Plugin\DataType\Deriver\FieldItemDeriver"
+ * deriver = "Drupal\Core\Field\Plugin\DataType\Deriver\FieldItemDeriver"
* )
*/
abstract class FieldItem {
diff --git a/core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php b/core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php
index b01d1ac..6951c77 100644
--- a/core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php
+++ b/core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecorator.php
@@ -14,22 +14,22 @@ class ContainerDerivativeDiscoveryDecorator extends DerivativeDiscoveryDecorator
/**
* {@inheritdoc}
*/
- protected function getDerivativeFetcher($base_plugin_id, $base_definition) {
- if (!isset($this->derivativeFetchers[$base_plugin_id])) {
- $this->derivativeFetchers[$base_plugin_id] = FALSE;
- $class = $this->getDerivativeClass($base_definition);
+ protected function getDeriver($base_plugin_id, $base_definition) {
+ if (!isset($this->derivers[$base_plugin_id])) {
+ $this->derivers[$base_plugin_id] = FALSE;
+ $class = $this->getDeriverClass($base_definition);
if ($class) {
- // If the derivative class provides a factory method, pass the container
- // to it.
- if (is_subclass_of($class, 'Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface')) {
- $this->derivativeFetchers[$base_plugin_id] = $class::create(\Drupal::getContainer(), $base_plugin_id);
+ // If the deriver provides a factory method, pass the container to it.
+ if (is_subclass_of($class, '\Drupal\Core\Plugin\Discovery\ContainerDeriverInterface')) {
+ /** @var \Drupal\Core\Plugin\Discovery\ContainerDeriverInterface $class */
+ $this->derivers[$base_plugin_id] = $class::create(\Drupal::getContainer(), $base_plugin_id);
}
else {
- $this->derivativeFetchers[$base_plugin_id] = new $class($base_plugin_id);
+ $this->derivers[$base_plugin_id] = new $class($base_plugin_id);
}
}
}
- return $this->derivativeFetchers[$base_plugin_id] ?: NULL;
+ return $this->derivers[$base_plugin_id] ?: NULL;
}
}
diff --git a/core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeInterface.php b/core/lib/Drupal/Core/Plugin/Discovery/ContainerDeriverInterface.php
index c3f7473..e0e9ee7 100644
--- a/core/lib/Drupal/Core/Plugin/Discovery/ContainerDerivativeInterface.php
+++ b/core/lib/Drupal/Core/Plugin/Discovery/ContainerDeriverInterface.php
@@ -2,25 +2,26 @@
/**
* @file
- * Contains \Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface.
+ * Contains \Drupal\Core\Plugin\Discovery\ContainerDeriverInterface.
*/
namespace Drupal\Core\Plugin\Discovery;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
- * Derivative fetcher interface to pass the container to static create method.
+ * Provides additional plugin definitions based on an existing definition using
+ * service injection.
*/
-interface ContainerDerivativeInterface extends DerivativeInterface {
+interface ContainerDeriverInterface extends DeriverInterface {
/**
- * Creates an instance of the derivative fetcher.
+ * Creates a new class instance.
*
* @param \Symfony\Component\DependencyInjection\ContainerInterface $container
* The container to pull out services used in the fetcher.
- * @param string $plugin_id
+ * @param string $base_plugin_id
* The base plugin ID for the plugin ID.
*
* @return static
diff --git a/core/modules/block/block.local_tasks.yml b/core/modules/block/block.local_tasks.yml
index ca6917b..efba19c 100644
--- a/core/modules/block/block.local_tasks.yml
+++ b/core/modules/block/block.local_tasks.yml
@@ -12,4 +12,4 @@ block.admin_display_theme:
title: 'Block layout'
route_name: block.admin_display_theme
parent_id: block.admin_display
- derivative: 'Drupal\block\Plugin\Derivative\ThemeLocalTask'
+ deriver: 'Drupal\block\Plugin\Derivative\ThemeLocalTask'
diff --git a/core/modules/block/custom_block/src/Plugin/Derivative/CustomBlock.php b/core/modules/block/custom_block/src/Plugin/Derivative/CustomBlock.php
new file mode 100644
index 0000000..976703d
--- /dev/null
+++ b/core/modules/block/custom_block/src/Plugin/Derivative/CustomBlock.php
@@ -0,0 +1,28 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\custom_block\Plugin\Derivative\CustomBlock.
+ */
+
+namespace Drupal\custom_block\Plugin\Derivative;
+
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
+
+/**
+ * Retrieves block plugin definitions for all custom blocks.
+ */
+class CustomBlock extends DeriverBase {
+ /**
+ * {@inheritdoc}
+ */
+ public function getDerivativeDefinitions($base_plugin_definition) {
+ $custom_blocks = entity_load_multiple('custom_block');
+ foreach ($custom_blocks as $custom_block) {
+ $this->derivatives[$custom_block->uuid()] = $base_plugin_definition;
+ $this->derivatives[$custom_block->uuid()]['admin_label'] = $custom_block->label();
+ }
+ return parent::getDerivativeDefinitions($base_plugin_definition);
+ }
+}
diff --git a/core/modules/block/src/BlockPluginInterface.php b/core/modules/block/src/BlockPluginInterface.php
index 9f3090a..f1a94ca 100644
--- a/core/modules/block/src/BlockPluginInterface.php
+++ b/core/modules/block/src/BlockPluginInterface.php
@@ -8,6 +8,7 @@
namespace Drupal\block;
use Drupal\Component\Plugin\Context\ContextInterface;
+use Drupal\Component\Plugin\DerivativeInspectionInterface;
use Drupal\Core\Cache\CacheableInterface;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\Component\Plugin\ConfigurablePluginInterface;
@@ -24,7 +25,7 @@ use Drupal\Core\Session\AccountInterface;
*
* @ingroup block_api
*/
-interface BlockPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface, CacheableInterface {
+interface BlockPluginInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface, CacheableInterface, DerivativeInspectionInterface {
/**
* Returns the user-facing block label.
diff --git a/core/modules/block/src/BlockViewBuilder.php b/core/modules/block/src/BlockViewBuilder.php
index 3a1eb04..de1b5fe 100644
--- a/core/modules/block/src/BlockViewBuilder.php
+++ b/core/modules/block/src/BlockViewBuilder.php
@@ -37,12 +37,13 @@ class BlockViewBuilder extends EntityViewBuilder {
* {@inheritdoc}
*/
public function viewMultiple(array $entities = array(), $view_mode = 'full', $langcode = NULL) {
+ /** @var \Drupal\block\BlockInterface[] $entities */
$build = array();
foreach ($entities as $entity) {
$entity_id = $entity->id();
$plugin = $entity->getPlugin();
$plugin_id = $plugin->getPluginId();
- $base_id = $plugin->getBasePluginId();
+ $base_id = $plugin->getBaseId();
$derivative_id = $plugin->getDerivativeId();
$configuration = $plugin->getConfiguration();
diff --git a/core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php b/core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php
index be4cad5..849df45 100644
--- a/core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php
+++ b/core/modules/block/src/Plugin/Derivative/ThemeLocalTask.php
@@ -7,16 +7,16 @@
namespace Drupal\block\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Extension\ThemeHandlerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides dynamic tabs based on active themes.
*/
-class ThemeLocalTask extends DerivativeBase implements ContainerDerivativeInterface {
+class ThemeLocalTask extends DeriverBase implements ContainerDeriverInterface {
/**
* Stores the theme settings config object.
diff --git a/core/modules/block/src/Tests/BlockPreprocessUnitTest.php b/core/modules/block/src/Tests/BlockPreprocessUnitTest.php
index e343019..abae83f 100644
--- a/core/modules/block/src/Tests/BlockPreprocessUnitTest.php
+++ b/core/modules/block/src/Tests/BlockPreprocessUnitTest.php
@@ -37,6 +37,7 @@ class BlockPreprocessUnitTest extends WebTestBase {
// an underscore (not transformed) and a hyphen (transformed to underscore),
// and generates possibilities for each level of derivative.
// @todo Clarify this comment.
+ /** @var \Drupal\block\BlockInterface $block */
$block = entity_create('block', array(
'plugin' => 'system_menu_block:admin',
'region' => 'footer',
@@ -48,7 +49,7 @@ class BlockPreprocessUnitTest extends WebTestBase {
$plugin = $block->getPlugin();
$variables['elements']['#configuration'] = $plugin->getConfiguration();
$variables['elements']['#plugin_id'] = $plugin->getPluginId();
- $variables['elements']['#base_plugin_id'] = $plugin->getBasePluginId();
+ $variables['elements']['#base_plugin_id'] = $plugin->getBaseId();
$variables['elements']['#derivative_plugin_id'] = $plugin->getDerivativeId();
$variables['elements']['content'] = array();
diff --git a/core/modules/block/src/Tests/BlockTemplateSuggestionsUnitTest.php b/core/modules/block/src/Tests/BlockTemplateSuggestionsUnitTest.php
index a3f77b4..a80e09b 100644
--- a/core/modules/block/src/Tests/BlockTemplateSuggestionsUnitTest.php
+++ b/core/modules/block/src/Tests/BlockTemplateSuggestionsUnitTest.php
@@ -37,6 +37,7 @@ class BlockTemplateSuggestionsUnitTest extends WebTestBase {
// an underscore (not transformed) and a hyphen (transformed to underscore),
// and generates possibilities for each level of derivative.
// @todo Clarify this comment.
+ /** @var \Drupal\block\BlockInterface $block */
$block = entity_create('block', array(
'plugin' => 'system_menu_block:admin',
'region' => 'footer',
@@ -48,7 +49,7 @@ class BlockTemplateSuggestionsUnitTest extends WebTestBase {
$variables['elements']['#configuration'] = $plugin->getConfiguration();
$variables['elements']['#plugin_id'] = $plugin->getPluginId();
$variables['elements']['#id'] = $block->id();
- $variables['elements']['#base_plugin_id'] = $plugin->getBasePluginId();
+ $variables['elements']['#base_plugin_id'] = $plugin->getBaseId();
$variables['elements']['#derivative_plugin_id'] = $plugin->getDerivativeId();
$variables['elements']['content'] = array();
$suggestions = block_theme_suggestions_block($variables);
diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
index 9f3d92d..49a53dc 100644
--- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
+++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
@@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "block_content",
* admin_label = @Translation("Custom block"),
* category = @Translation("Custom"),
- * derivative = "Drupal\block_content\Plugin\Derivative\BlockContent"
+ * deriver = "Drupal\block_content\Plugin\Derivative\BlockContent"
* )
*/
class BlockContentBlock extends BlockBase implements ContainerFactoryPluginInterface {
diff --git a/core/modules/block_content/src/Plugin/Derivative/BlockContent.php b/core/modules/block_content/src/Plugin/Derivative/BlockContent.php
index a7c1784..f77a297 100644
--- a/core/modules/block_content/src/Plugin/Derivative/BlockContent.php
+++ b/core/modules/block_content/src/Plugin/Derivative/BlockContent.php
@@ -7,13 +7,12 @@
namespace Drupal\block_content\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
/**
* Retrieves block plugin definitions for all custom blocks.
*/
-class BlockContent extends DerivativeBase {
+class BlockContent extends DeriverBase {
/**
* {@inheritdoc}
*/
diff --git a/core/modules/config_translation/config_translation.contextual_links.yml b/core/modules/config_translation/config_translation.contextual_links.yml
index ecdc1cd..71c4544 100644
--- a/core/modules/config_translation/config_translation.contextual_links.yml
+++ b/core/modules/config_translation/config_translation.contextual_links.yml
@@ -1,4 +1,4 @@
config_translation.contextual_links:
title: 'Translate @type_name'
- derivative: 'Drupal\config_translation\Plugin\Derivative\ConfigTranslationContextualLinks'
+ deriver: 'Drupal\config_translation\Plugin\Derivative\ConfigTranslationContextualLinks'
weight: 100
diff --git a/core/modules/config_translation/config_translation.local_tasks.yml b/core/modules/config_translation/config_translation.local_tasks.yml
index 304d557..513eb58 100644
--- a/core/modules/config_translation/config_translation.local_tasks.yml
+++ b/core/modules/config_translation/config_translation.local_tasks.yml
@@ -1,4 +1,4 @@
config_translation.local_tasks:
title: 'Translate @type_name'
- derivative: 'Drupal\config_translation\Plugin\Derivative\ConfigTranslationLocalTasks'
+ deriver: 'Drupal\config_translation\Plugin\Derivative\ConfigTranslationLocalTasks'
weight: 100
diff --git a/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationContextualLinks.php b/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationContextualLinks.php
index f705d4e..5050b0d 100644
--- a/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationContextualLinks.php
+++ b/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationContextualLinks.php
@@ -8,15 +8,15 @@
namespace Drupal\config_translation\Plugin\Derivative;
use Drupal\Component\Utility\Unicode;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\config_translation\ConfigMapperManagerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides dynamic contextual links for configuration translation.
*/
-class ConfigTranslationContextualLinks extends DerivativeBase implements ContainerDerivativeInterface {
+class ConfigTranslationContextualLinks extends DeriverBase implements ContainerDeriverInterface {
/**
* The mapper plugin discovery service.
diff --git a/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationLocalTasks.php b/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationLocalTasks.php
index 53077d6..c36f72d 100644
--- a/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationLocalTasks.php
+++ b/core/modules/config_translation/src/Plugin/Derivative/ConfigTranslationLocalTasks.php
@@ -8,14 +8,14 @@
namespace Drupal\config_translation\Plugin\Derivative;
use Drupal\config_translation\ConfigMapperManagerInterface;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides dynamic local tasks for config translation.
*/
-class ConfigTranslationLocalTasks extends DerivativeBase implements ContainerDerivativeInterface {
+class ConfigTranslationLocalTasks extends DeriverBase implements ContainerDeriverInterface {
/**
* The mapper plugin discovery service.
diff --git a/core/modules/content_translation/content_translation.contextual_links.yml b/core/modules/content_translation/content_translation.contextual_links.yml
index 2d2818a..67aa2eb 100644
--- a/core/modules/content_translation/content_translation.contextual_links.yml
+++ b/core/modules/content_translation/content_translation.contextual_links.yml
@@ -1,3 +1,3 @@
content_translation.contextual_links:
- derivative: 'Drupal\content_translation\Plugin\Derivative\ContentTranslationContextualLinks'
+ deriver: 'Drupal\content_translation\Plugin\Derivative\ContentTranslationContextualLinks'
weight: 2
diff --git a/core/modules/content_translation/content_translation.local_tasks.yml b/core/modules/content_translation/content_translation.local_tasks.yml
index 151c584..119d0d9 100644
--- a/core/modules/content_translation/content_translation.local_tasks.yml
+++ b/core/modules/content_translation/content_translation.local_tasks.yml
@@ -1,3 +1,3 @@
content_translation.local_tasks:
- derivative: 'Drupal\content_translation\Plugin\Derivative\ContentTranslationLocalTasks'
+ deriver: 'Drupal\content_translation\Plugin\Derivative\ContentTranslationLocalTasks'
weight: 100
diff --git a/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php b/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php
index f231aa3..b1f424f 100644
--- a/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php
+++ b/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationContextualLinks.php
@@ -7,8 +7,8 @@
namespace Drupal\content_translation\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\content_translation\ContentTranslationManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @see \Drupal\content_translation\Plugin\Menu\ContextualLink\ContentTranslationContextualLinks
*/
-class ContentTranslationContextualLinks extends DerivativeBase implements ContainerDerivativeInterface {
+class ContentTranslationContextualLinks extends DeriverBase implements ContainerDeriverInterface {
/**
* The content translation manager.
diff --git a/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php b/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php
index 3fcfefe..8b060f2 100644
--- a/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php
+++ b/core/modules/content_translation/src/Plugin/Derivative/ContentTranslationLocalTasks.php
@@ -8,14 +8,14 @@
namespace Drupal\content_translation\Plugin\Derivative;
use Drupal\content_translation\ContentTranslationManagerInterface;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides dynamic local tasks for content translation.
*/
-class ContentTranslationLocalTasks extends DerivativeBase implements ContainerDerivativeInterface {
+class ContentTranslationLocalTasks extends DeriverBase implements ContainerDeriverInterface {
/**
* The base plugin ID
diff --git a/core/modules/entity_reference/src/Plugin/Derivative/SelectionBase.php b/core/modules/entity_reference/src/Plugin/Derivative/SelectionBase.php
index 79a8327..9f7dc75 100644
--- a/core/modules/entity_reference/src/Plugin/Derivative/SelectionBase.php
+++ b/core/modules/entity_reference/src/Plugin/Derivative/SelectionBase.php
@@ -7,12 +7,12 @@
namespace Drupal\entity_reference\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
/**
* Base class for selection plugins provided by Entity Reference.
*/
-class SelectionBase extends DerivativeBase {
+class SelectionBase extends DeriverBase {
/**
* {@inheritdoc}
*/
diff --git a/core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php b/core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php
index ae4f5fc..be55673 100644
--- a/core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php
+++ b/core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php
@@ -22,7 +22,7 @@ use Drupal\entity_reference\Plugin\Type\Selection\SelectionInterface;
* label = @Translation("Default"),
* group = "default",
* weight = 0,
- * derivative = "Drupal\entity_reference\Plugin\Derivative\SelectionBase"
+ * deriver = "Drupal\entity_reference\Plugin\Derivative\SelectionBase"
* )
*/
class SelectionBase implements SelectionInterface {
diff --git a/core/modules/field_ui/field_ui.local_tasks.yml b/core/modules/field_ui/field_ui.local_tasks.yml
index d724933..5f00837 100644
--- a/core/modules/field_ui/field_ui.local_tasks.yml
+++ b/core/modules/field_ui/field_ui.local_tasks.yml
@@ -4,4 +4,4 @@ field_ui.list:
base_route: field_ui.list
field_ui.fields:
class: \Drupal\Core\Menu\LocalTaskDefault
- derivative: \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask
+ deriver: \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask
diff --git a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php
index 37e546d..1238afd 100644
--- a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php
+++ b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php
@@ -8,8 +8,8 @@
namespace Drupal\field_ui\Plugin\Derivative;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
@@ -18,7 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides local task definitions for all entity bundles.
*/
-class FieldUiLocalTask extends DerivativeBase implements ContainerDerivativeInterface {
+class FieldUiLocalTask extends DeriverBase implements ContainerDeriverInterface {
use StringTranslationTrait;
/**
diff --git a/core/modules/language/src/Plugin/Block/LanguageBlock.php b/core/modules/language/src/Plugin/Block/LanguageBlock.php
index 42d5bf3..42c8c8d 100644
--- a/core/modules/language/src/Plugin/Block/LanguageBlock.php
+++ b/core/modules/language/src/Plugin/Block/LanguageBlock.php
@@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "language_block",
* admin_label = @Translation("Language switcher"),
* category = @Translation("System"),
- * derivative = "Drupal\language\Plugin\Derivative\LanguageBlock"
+ * deriver = "Drupal\language\Plugin\Derivative\LanguageBlock"
* )
*/
class LanguageBlock extends BlockBase implements ContainerFactoryPluginInterface {
diff --git a/core/modules/language/src/Plugin/Derivative/LanguageBlock.php b/core/modules/language/src/Plugin/Derivative/LanguageBlock.php
index b673d66..3c54c25 100644
--- a/core/modules/language/src/Plugin/Derivative/LanguageBlock.php
+++ b/core/modules/language/src/Plugin/Derivative/LanguageBlock.php
@@ -7,13 +7,13 @@
namespace Drupal\language\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\language\ConfigurableLanguageManagerInterface;
/**
* Provides language switcher block plugin definitions for all languages.
*/
-class LanguageBlock extends DerivativeBase {
+class LanguageBlock extends DeriverBase {
/**
* {@inheritdoc}
diff --git a/core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php b/core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php
index 64816ec..8f4a573 100644
--- a/core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php
+++ b/core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php
@@ -7,10 +7,10 @@
namespace Drupal\migrate\Plugin\Derivative;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
-class MigrateEntity implements ContainerDerivativeInterface {
+class MigrateEntity implements ContainerDeriverInterface {
/**
* List of derivative definitions.
diff --git a/core/modules/migrate/src/Plugin/Derivative/MigrateEntityRevision.php b/core/modules/migrate/src/Plugin/Derivative/MigrateEntityRevision.php
index 922bedd..5c9ae19 100644
--- a/core/modules/migrate/src/Plugin/Derivative/MigrateEntityRevision.php
+++ b/core/modules/migrate/src/Plugin/Derivative/MigrateEntityRevision.php
@@ -7,10 +7,10 @@
namespace Drupal\migrate\Plugin\Derivative;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
-class MigrateEntityRevision implements ContainerDerivativeInterface {
+class MigrateEntityRevision implements ContainerDeriverInterface {
/**
* List of derivative definitions.
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
index e29a309..8d69f80 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/Entity.php
@@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* @MigrateDestination(
* id = "entity",
- * derivative = "Drupal\migrate\Plugin\Derivative\MigrateEntity"
+ * deriver = "Drupal\migrate\Plugin\Derivative\MigrateEntity"
* )
*/
abstract class Entity extends DestinationBase implements ContainerFactoryPluginInterface {
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php
index 353f98c..8aaefef 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php
@@ -14,7 +14,7 @@ use Drupal\migrate\Row;
/**
* @MigrateDestination(
* id = "entity_revision",
- * derivative = "Drupal\migrate\Plugin\Derivative\MigrateEntityRevision"
+ * deriver = "Drupal\migrate\Plugin\Derivative\MigrateEntityRevision"
* )
*/
class EntityRevision extends EntityContentBase {
diff --git a/core/modules/rest/src/Plugin/Derivative/EntityDerivative.php b/core/modules/rest/src/Plugin/Derivative/EntityDerivative.php
index fc62ede..5b17bc6 100644
--- a/core/modules/rest/src/Plugin/Derivative/EntityDerivative.php
+++ b/core/modules/rest/src/Plugin/Derivative/EntityDerivative.php
@@ -8,7 +8,7 @@
namespace Drupal\rest\Plugin\Derivative;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\Routing\RouteBuilder;
use Drupal\Core\Routing\RouteBuilderInterface;
use Drupal\Core\Routing\RouteProviderInterface;
@@ -18,7 +18,7 @@ use Symfony\Component\Routing\Exception\RouteNotFoundException;
/**
* Provides a resource plugin definition for every entity type.
*/
-class EntityDerivative implements ContainerDerivativeInterface {
+class EntityDerivative implements ContainerDeriverInterface {
/**
* List of derivative definitions.
diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
index 5625a84..40f7fe6 100644
--- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
+++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
@@ -22,7 +22,7 @@ use Symfony\Component\HttpKernel\Exception\HttpException;
* id = "entity",
* label = @Translation("Entity"),
* serialization_class = "Drupal\Core\Entity\Entity",
- * derivative = "Drupal\rest\Plugin\Derivative\EntityDerivative",
+ * deriver = "Drupal\rest\Plugin\Derivative\EntityDerivative",
* uri_paths = {
* "canonical" = "/entity/{entity_type}/{entity}",
* "http://drupal.org/link-relations/create" = "/entity/{entity_type}"
diff --git a/core/modules/search/search.local_tasks.yml b/core/modules/search/search.local_tasks.yml
index ac332d7..882f95f 100644
--- a/core/modules/search/search.local_tasks.yml
+++ b/core/modules/search/search.local_tasks.yml
@@ -1,3 +1,3 @@
search.plugins:
class: \Drupal\Core\Menu\LocalTaskDefault
- derivative: \Drupal\search\Plugin\Derivative\SearchLocalTask
+ deriver: \Drupal\search\Plugin\Derivative\SearchLocalTask
diff --git a/core/modules/search/src/Plugin/Derivative/SearchLocalTask.php b/core/modules/search/src/Plugin/Derivative/SearchLocalTask.php
index 543c190..f9e07a0 100644
--- a/core/modules/search/src/Plugin/Derivative/SearchLocalTask.php
+++ b/core/modules/search/src/Plugin/Derivative/SearchLocalTask.php
@@ -7,15 +7,15 @@
namespace Drupal\search\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\search\SearchPageRepositoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides local tasks for each search page.
*/
-class SearchLocalTask extends DerivativeBase implements ContainerDerivativeInterface {
+class SearchLocalTask extends DeriverBase implements ContainerDeriverInterface {
/**
* The search page repository.
diff --git a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php
index a698e1f..5381471 100644
--- a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php
+++ b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php
@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* id = "system_menu_block",
* admin_label = @Translation("Menu"),
* category = @Translation("Menus"),
- * derivative = "Drupal\system\Plugin\Derivative\SystemMenuBlock"
+ * deriver = "Drupal\system\Plugin\Derivative\SystemMenuBlock"
* )
*/
class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterface {
diff --git a/core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php b/core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php
index 9b06eb3..611ef2a 100644
--- a/core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php
+++ b/core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php
@@ -7,9 +7,9 @@
namespace Drupal\system\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Entity\EntityStorageInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @see \Drupal\system\Plugin\Block\SystemMenuBlock
*/
-class SystemMenuBlock extends DerivativeBase implements ContainerDerivativeInterface {
+class SystemMenuBlock extends DeriverBase implements ContainerDeriverInterface {
/**
* The menu storage.
diff --git a/core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php b/core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php
index 0fa1ebc..9c9de19 100644
--- a/core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php
+++ b/core/modules/system/src/Plugin/Derivative/ThemeLocalTask.php
@@ -7,15 +7,15 @@
namespace Drupal\system\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Extension\ThemeHandlerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides dynamic tabs based on active themes.
*/
-class ThemeLocalTask extends DerivativeBase implements ContainerDerivativeInterface {
+class ThemeLocalTask extends DeriverBase implements ContainerDeriverInterface {
/**
* The theme handler.
diff --git a/core/modules/system/system.local_tasks.yml b/core/modules/system/system.local_tasks.yml
index ebc1d0f..02fe18b 100644
--- a/core/modules/system/system.local_tasks.yml
+++ b/core/modules/system/system.local_tasks.yml
@@ -32,7 +32,7 @@ system.theme_settings_theme:
route_name: system.theme_settings_theme
title: 'Theme name'
parent_id: system.theme_settings
- derivative: Drupal\system\Plugin\Derivative\ThemeLocalTask
+ deriver: Drupal\system\Plugin\Derivative\ThemeLocalTask
system.modules_list:
route_name: system.modules_list
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.local_tasks.yml b/core/modules/system/tests/modules/entity_test/entity_test.local_tasks.yml
index a411359..1acde6a 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.local_tasks.yml
+++ b/core/modules/system/tests/modules/entity_test/entity_test.local_tasks.yml
@@ -1,2 +1,2 @@
entity_test.local_tasks:
- derivative: 'Drupal\entity_test\Plugin\Derivative\EntityTestLocalTasks'
+ deriver: 'Drupal\entity_test\Plugin\Derivative\EntityTestLocalTasks'
diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php
index 8188ea4..9745ba2 100644
--- a/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php
+++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Derivative/EntityTestLocalTasks.php
@@ -7,12 +7,12 @@
namespace Drupal\entity_test\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
/**
* Defines the local tasks for all the entity_test entities.
*/
-class EntityTestLocalTasks extends DerivativeBase {
+class EntityTestLocalTasks extends DeriverBase {
/**
* {@inheritdoc}
diff --git a/core/modules/system/tests/modules/menu_test/menu_test.local_tasks.yml b/core/modules/system/tests/modules/menu_test/menu_test.local_tasks.yml
index f4faf95..c8cd284 100644
--- a/core/modules/system/tests/modules/menu_test/menu_test.local_tasks.yml
+++ b/core/modules/system/tests/modules/menu_test/menu_test.local_tasks.yml
@@ -29,7 +29,7 @@ menu_test.local_task_test_tasks_settings_derived:
route_name: menu_test.local_task_test_tasks_settings_derived
title: derived
parent_id: menu_test.local_task_test_tasks_settings
- derivative: Drupal\menu_test\Plugin\Derivative\LocalTaskTest
+ deriver: Drupal\menu_test\Plugin\Derivative\LocalTaskTest
weight: 50
menu_test.local_task_test.placeholder_sub1:
route_name: menu_test.local_task_test_placeholder_sub1
diff --git a/core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTest.php b/core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTest.php
index 29314ef..a345458 100644
--- a/core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTest.php
+++ b/core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTest.php
@@ -6,9 +6,9 @@
namespace Drupal\menu_test\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
-class LocalTaskTest extends DerivativeBase {
+class LocalTaskTest extends DeriverBase {
/**
* {@inheritdoc}
diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php
index 6de31cd..ca5847f 100644
--- a/core/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php
+++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/MockBlockManager.php
@@ -52,7 +52,7 @@ class MockBlockManager extends PluginManagerBase {
// base plugin, are available to the system.
$this->discovery->setDefinition('menu', array(
'class' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlock',
- 'derivative' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlockDeriver',
+ 'deriver' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockMenuBlockDeriver',
));
// A plugin defining itself as a derivative.
$this->discovery->setDefinition('menu:foo', array(
@@ -69,7 +69,7 @@ class MockBlockManager extends PluginManagerBase {
$this->discovery->setDefinition('layout', array(
'label' => t('Layout'),
'class' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockLayoutBlock',
- 'derivative' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockLayoutBlockDeriver',
+ 'deriver' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockLayoutBlockDeriver',
));
// A block plugin that requires context to function. This block requires a
diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php
index 1a33551..267a397 100644
--- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php
+++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockLayoutBlockDeriver.php
@@ -7,17 +7,17 @@
namespace Drupal\plugin_test\Plugin\plugin_test\mock_block;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverInterface;
/**
- * Mock implementation of DerivativeInterface for the mock layout block plugin.
+ * Mock implementation of DeriverInterface for the mock layout block plugin.
*
* @see \Drupal\plugin_test\Plugin\MockBlockManager
*/
-class MockLayoutBlockDeriver implements DerivativeInterface {
+class MockLayoutBlockDeriver implements DeriverInterface {
/**
- * Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinition().
+ * {@inheritdoc}
*/
public function getDerivativeDefinition($derivative_id, $base_plugin_definition) {
$derivatives = $this->getDerivativeDefinitions($base_plugin_definition);
@@ -27,14 +27,14 @@ class MockLayoutBlockDeriver implements DerivativeInterface {
}
/**
- * Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
+ * {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
// This isn't strictly necessary, but it helps reduce clutter in
// DerivativePluginTest::testDerivativeDecorator()'s $expected variable.
// Since derivative definitions don't need further deriving, we remove this
// key from the returned definitions.
- unset($base_plugin_definition['derivative']);
+ unset($base_plugin_definition['deriver']);
$derivatives = array(
// Adding a NULL key signifies that the base plugin may also be used in
diff --git a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php
index aaa1d1c..9048e00 100644
--- a/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php
+++ b/core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/mock_block/MockMenuBlockDeriver.php
@@ -7,17 +7,17 @@
namespace Drupal\plugin_test\Plugin\plugin_test\mock_block;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverInterface;
/**
- * Mock implementation of DerivativeInterface for the mock menu block plugin.
+ * Mock implementation of DeriverInterface for the mock menu block plugin.
*
* @see \Drupal\plugin_test\Plugin\MockBlockManager
*/
-class MockMenuBlockDeriver implements DerivativeInterface {
+class MockMenuBlockDeriver implements DeriverInterface {
/**
- * Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinition().
+ * {@inheritdoc}
*/
public function getDerivativeDefinition($derivative_id, $base_plugin_definition) {
$derivatives = $this->getDerivativeDefinitions($base_plugin_definition);
@@ -27,14 +27,14 @@ class MockMenuBlockDeriver implements DerivativeInterface {
}
/**
- * Implements Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
+ * {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
// This isn't strictly necessary, but it helps reduce clutter in
// DerivativePluginTest::testDerivativeDecorator()'s $expected variable.
// Since derivative definitions don't need further deriving, we remove this
// key from the returned definitions.
- unset($base_plugin_definition['derivative']);
+ unset($base_plugin_definition['deriver']);
// Here, we create some mock menu block definitions for menus that might
// exist in a typical Drupal site. In a real implementation, we would query
diff --git a/core/modules/views/src/Plugin/Block/ViewsBlock.php b/core/modules/views/src/Plugin/Block/ViewsBlock.php
index 2648919..a80aa97 100644
--- a/core/modules/views/src/Plugin/Block/ViewsBlock.php
+++ b/core/modules/views/src/Plugin/Block/ViewsBlock.php
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* @Block(
* id = "views_block",
* admin_label = @Translation("Views Block"),
- * derivative = "Drupal\views\Plugin\Derivative\ViewsBlock"
+ * deriver = "Drupal\views\Plugin\Derivative\ViewsBlock"
* )
*/
class ViewsBlock extends ViewsBlockBase {
diff --git a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php
index 4796f69..f38d485 100644
--- a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php
+++ b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php
@@ -13,7 +13,7 @@ namespace Drupal\views\Plugin\Block;
* @Block(
* id = "views_exposed_filter_block",
* admin_label = @Translation("Views Exposed Filter Block"),
- * derivative = "Drupal\views\Plugin\Derivative\ViewsExposedFilterBlock"
+ * deriver = "Drupal\views\Plugin\Derivative\ViewsExposedFilterBlock"
* )
*/
class ViewsExposedFilterBlock extends ViewsBlockBase {
diff --git a/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php b/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php
index 211d8be..f7610f2 100644
--- a/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php
+++ b/core/modules/views/src/Plugin/Derivative/DefaultWizardDeriver.php
@@ -7,7 +7,7 @@
namespace Drupal\views\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\views\Views;
/**
@@ -15,7 +15,7 @@ use Drupal\views\Views;
*
* The derivatives store all base table plugin information.
*/
-class DefaultWizardDeriver extends DerivativeBase {
+class DefaultWizardDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
diff --git a/core/modules/views/src/Plugin/Derivative/ViewsBlock.php b/core/modules/views/src/Plugin/Derivative/ViewsBlock.php
index be44dca..cec9895 100644
--- a/core/modules/views/src/Plugin/Derivative/ViewsBlock.php
+++ b/core/modules/views/src/Plugin/Derivative/ViewsBlock.php
@@ -8,7 +8,7 @@
namespace Drupal\views\Plugin\Derivative;
use Drupal\Core\Entity\EntityStorageInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @see \Drupal\views\Plugin\block\block\ViewsBlock
*/
-class ViewsBlock implements ContainerDerivativeInterface {
+class ViewsBlock implements ContainerDeriverInterface {
/**
* List of derivative definitions.
@@ -63,7 +63,7 @@ class ViewsBlock implements ContainerDerivativeInterface {
}
/**
- * Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinition().
+ * {@inheritdoc}
*/
public function getDerivativeDefinition($derivative_id, $base_plugin_definition) {
if (!empty($this->derivatives) && !empty($this->derivatives[$derivative_id])) {
@@ -74,7 +74,7 @@ class ViewsBlock implements ContainerDerivativeInterface {
}
/**
- * Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
+ * {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
// Check all Views for block displays.
diff --git a/core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php b/core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php
index 7c83546..ee6a582 100644
--- a/core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php
+++ b/core/modules/views/src/Plugin/Derivative/ViewsEntityArgumentValidator.php
@@ -7,9 +7,9 @@
namespace Drupal\views\Plugin\Derivative;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
use Drupal\Core\Entity\EntityManagerInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @see \Drupal\views\Plugin\views\argument_validator\Entity
*/
-class ViewsEntityArgumentValidator extends DerivativeBase implements ContainerDerivativeInterface {
+class ViewsEntityArgumentValidator extends DeriverBase implements ContainerDeriverInterface {
use StringTranslationTrait;
/**
diff --git a/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php b/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php
index 4376fc3..ea064c0 100644
--- a/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php
+++ b/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php
@@ -8,7 +8,7 @@
namespace Drupal\views\Plugin\Derivative;
use Drupal\Core\Entity\EntityManagerInterface;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\views\ViewsData;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -19,7 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @see \Drupal\views\Plugin\views\row\EntityRow
*/
-class ViewsEntityRow implements ContainerDerivativeInterface {
+class ViewsEntityRow implements ContainerDeriverInterface {
/**
* Stores all entity row plugin information.
diff --git a/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php
index 2dd5f69..0ef5fcd 100644
--- a/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php
+++ b/core/modules/views/src/Plugin/Derivative/ViewsExposedFilterBlock.php
@@ -7,7 +7,7 @@
namespace Drupal\views\Plugin\Derivative;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @see \Drupal\views\Plugin\block\block\ViewsExposedFilterBlock
*/
-class ViewsExposedFilterBlock implements ContainerDerivativeInterface {
+class ViewsExposedFilterBlock implements ContainerDeriverInterface {
/**
* List of derivative definitions.
@@ -63,7 +63,7 @@ class ViewsExposedFilterBlock implements ContainerDerivativeInterface {
}
/**
- * Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinition().
+ * {@inheritdoc}
*/
public function getDerivativeDefinition($derivative_id, $base_plugin_definition) {
if (!empty($this->derivatives) && !empty($this->derivatives[$derivative_id])) {
@@ -74,7 +74,7 @@ class ViewsExposedFilterBlock implements ContainerDerivativeInterface {
}
/**
- * Implements \Drupal\Component\Plugin\Derivative\DerivativeInterface::getDerivativeDefinitions().
+ * {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
// Check all Views for displays with an exposed filter block.
diff --git a/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php b/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php
index fb05a49..f1ae20d 100644
--- a/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php
+++ b/core/modules/views/src/Plugin/Derivative/ViewsLocalTask.php
@@ -8,8 +8,8 @@
namespace Drupal\views\Plugin\Derivative;
use Drupal\Core\State\StateInterface;
-use Drupal\Component\Plugin\Derivative\DerivativeBase;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverBase;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\Routing\RouteProviderInterface;
use Drupal\views\Views;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides local task definitions for all views configured as local tasks.
*/
-class ViewsLocalTask extends DerivativeBase implements ContainerDerivativeInterface {
+class ViewsLocalTask extends DeriverBase implements ContainerDeriverInterface {
/**
* The route provider.
diff --git a/core/modules/views/src/Plugin/views/argument_validator/Entity.php b/core/modules/views/src/Plugin/views/argument_validator/Entity.php
index cfe5f17..a807cbc 100644
--- a/core/modules/views/src/Plugin/views/argument_validator/Entity.php
+++ b/core/modules/views/src/Plugin/views/argument_validator/Entity.php
@@ -17,7 +17,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @ViewsArgumentValidator(
* id = "entity",
- * derivative = "Drupal\views\Plugin\Derivative\ViewsEntityArgumentValidator"
+ * deriver = "Drupal\views\Plugin\Derivative\ViewsEntityArgumentValidator"
* )
*
* @see \Drupal\views\Plugin\Derivative\ViewsEntityArgumentValidator
diff --git a/core/modules/views/src/Plugin/views/row/EntityRow.php b/core/modules/views/src/Plugin/views/row/EntityRow.php
index b9c5827..c46d354 100644
--- a/core/modules/views/src/Plugin/views/row/EntityRow.php
+++ b/core/modules/views/src/Plugin/views/row/EntityRow.php
@@ -20,7 +20,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @ViewsRow(
* id = "entity",
- * derivative = "Drupal\views\Plugin\Derivative\ViewsEntityRow"
+ * deriver = "Drupal\views\Plugin\Derivative\ViewsEntityRow"
* )
*/
class EntityRow extends RowPluginBase {
diff --git a/core/modules/views/src/Plugin/views/wizard/Standard.php b/core/modules/views/src/Plugin/views/wizard/Standard.php
index 6793a77..6683adc 100644
--- a/core/modules/views/src/Plugin/views/wizard/Standard.php
+++ b/core/modules/views/src/Plugin/views/wizard/Standard.php
@@ -14,7 +14,7 @@ namespace Drupal\views\Plugin\views\wizard;
*
* @ViewsWizard(
* id = "standard",
- * derivative = "Drupal\views\Plugin\Derivative\DefaultWizardDeriver",
+ * deriver = "Drupal\views\Plugin\Derivative\DefaultWizardDeriver",
* title = @Translation("Default wizard")
* )
*/
diff --git a/core/modules/views/tests/src/Plugin/Derivative/ViewsLocalTaskTest.php b/core/modules/views/tests/src/Plugin/Derivative/ViewsLocalTaskTest.php
index 359ae7c..f58aaae 100644
--- a/core/modules/views/tests/src/Plugin/Derivative/ViewsLocalTaskTest.php
+++ b/core/modules/views/tests/src/Plugin/Derivative/ViewsLocalTaskTest.php
@@ -35,7 +35,7 @@ class ViewsLocalTaskTest extends UnitTestCase {
protected $baseDefinition = array(
'class' => '\Drupal\views\Plugin\Menu\LocalTask\ViewsLocalTask',
- 'derivative' => '\Drupal\views\Plugin\Derivative\ViewsLocalTask'
+ 'deriver' => '\Drupal\views\Plugin\Derivative\ViewsLocalTask'
);
/**
diff --git a/core/modules/views/views.local_tasks.yml b/core/modules/views/views.local_tasks.yml
index f050e64..e9debba 100644
--- a/core/modules/views/views.local_tasks.yml
+++ b/core/modules/views/views.local_tasks.yml
@@ -1,3 +1,3 @@
views_view:
class: Drupal\Core\Menu\LocalTaskDefault
- derivative: \Drupal\views\Plugin\Derivative\ViewsLocalTask
+ deriver: \Drupal\views\Plugin\Derivative\ViewsLocalTask
diff --git a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
index 431499b..2b4ccd8 100644
--- a/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
+++ b/core/tests/Drupal/Tests/Component/Plugin/PluginBaseTest.php
@@ -58,28 +58,29 @@ class PluginBaseTest extends UnitTestCase {
}
/**
- * Tests the getBasePluginId method.
+ * Tests the getBaseId method.
*
- * @dataProvider providerTestGetBasePluginId
+ * @dataProvider providerTestGetBaseId
*
- * @see \Drupal\Component\Plugin\PluginBase::getBasePluginId()
+ * @see \Drupal\Component\Plugin\PluginBase::getBaseId()
*/
- public function testGetBasePluginId($plugin_id, $expected) {
+ public function testGetBaseId($plugin_id, $expected) {
+ /** @var \Drupal\Component\Plugin\PluginBase|\PHPUnit_Framework_MockObject_MockObject $plugin_base */
$plugin_base = $this->getMockForAbstractClass('Drupal\Component\Plugin\PluginBase', array(
array(),
$plugin_id,
array(),
));
- $this->assertEquals($expected, $plugin_base->getBasePluginId());
+ $this->assertEquals($expected, $plugin_base->getBaseId());
}
/**
- * Returns test data for testGetBasePluginId().
+ * Returns test data for testGetBaseId().
*
* @return array
*/
- public function providerTestGetBasePluginId() {
+ public function providerTestGetBaseId() {
return array(
array('base_id', 'base_id'),
array('base_id:derivative', 'base_id'),
@@ -88,13 +89,14 @@ class PluginBaseTest extends UnitTestCase {
/**
- * Tests the getBasePluginId method.
+ * Tests the getDerivativeId method.
*
* @dataProvider providerTestGetDerivativeId
*
- * @see \Drupal\Component\Plugin\PluginBase::getBasePluginId()
+ * @see \Drupal\Component\Plugin\PluginBase::getDerivativeId()
*/
public function testGetDerivativeId($plugin_id = NULL, $expected = NULL) {
+ /** @var \Drupal\Component\Plugin\PluginBase|\PHPUnit_Framework_MockObject_MockObject $plugin_base */
$plugin_base = $this->getMockForAbstractClass('Drupal\Component\Plugin\PluginBase', array(
array(),
$plugin_id,
@@ -105,7 +107,7 @@ class PluginBaseTest extends UnitTestCase {
}
/**
- * Returns test data for testGetBasePluginId().
+ * Returns test data for testGetDerivativeId().
*
* @return array
*/
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php
index 5a53a69..20d32ca 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/ContainerDerivativeDiscoveryDecoratorTest.php
@@ -46,11 +46,11 @@ class ContainerDerivativeDiscoveryDecoratorTest extends UnitTestCase {
$definitions = array();
$definitions['container_aware_discovery'] = array(
'id' => 'container_aware_discovery',
- 'derivative' => '\Drupal\Tests\Core\Plugin\Discovery\TestContainerDerivativeDiscovery',
+ 'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestContainerDerivativeDiscovery',
);
$definitions['non_container_aware_discovery'] = array(
'id' => 'non_container_aware_discovery',
- 'derivative' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
+ 'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
);
$discovery_main = $this->getMock('Drupal\Component\Plugin\Discovery\DiscoveryInterface');
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
index c22c201..079b315 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/DerivativeDiscoveryDecoratorTest.php
@@ -8,7 +8,7 @@
namespace Drupal\Tests\Core\Plugin\Discovery;
use Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator;
-use Drupal\Component\Plugin\Exception\InvalidDerivativeClassException;
+use Drupal\Component\Plugin\Exception\InvalidDeriverException;
use Drupal\Tests\UnitTestCase;
/**
@@ -50,7 +50,7 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase {
$definitions = array();
$definitions['non_container_aware_discovery'] = array(
'id' => 'non_container_aware_discovery',
- 'derivative' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
+ 'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
);
$this->discoveryMain->expects($this->any())
@@ -63,10 +63,10 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase {
// Ensure that both test derivatives got added.
$this->assertEquals(2, count($definitions));
$this->assertEquals('non_container_aware_discovery', $definitions['non_container_aware_discovery:test_discovery_0']['id']);
- $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery', $definitions['non_container_aware_discovery:test_discovery_0']['derivative']);
+ $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery', $definitions['non_container_aware_discovery:test_discovery_0']['deriver']);
$this->assertEquals('non_container_aware_discovery', $definitions['non_container_aware_discovery:test_discovery_1']['id']);
- $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery', $definitions['non_container_aware_discovery:test_discovery_1']['derivative']);
+ $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery', $definitions['non_container_aware_discovery:test_discovery_1']['deriver']);
}
/**
@@ -76,7 +76,7 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase {
$definitions = array();
$definitions['non_container_aware_discovery'] = (object) array(
'id' => 'non_container_aware_discovery',
- 'derivative' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscoveryWithObject',
+ 'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscoveryWithObject',
);
$this->discoveryMain->expects($this->any())
@@ -90,26 +90,26 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase {
$this->assertEquals(2, count($definitions));
$this->assertInstanceOf('\stdClass', $definitions['non_container_aware_discovery:test_discovery_0']);
$this->assertEquals('non_container_aware_discovery', $definitions['non_container_aware_discovery:test_discovery_0']->id);
- $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscoveryWithObject', $definitions['non_container_aware_discovery:test_discovery_0']->derivative);
+ $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscoveryWithObject', $definitions['non_container_aware_discovery:test_discovery_0']->deriver);
$this->assertInstanceOf('\stdClass', $definitions['non_container_aware_discovery:test_discovery_1']);
$this->assertEquals('non_container_aware_discovery', $definitions['non_container_aware_discovery:test_discovery_1']->id);
- $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscoveryWithObject', $definitions['non_container_aware_discovery:test_discovery_1']->derivative);
+ $this->assertEquals('\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscoveryWithObject', $definitions['non_container_aware_discovery:test_discovery_1']->deriver);
}
/**
* Tests the getDerivativeFetcher method with an invalid class.
*
- * @see \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDerivativeFetcher().\
+ * @see \Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator::getDeriver().\
*
- * @expectedException \Drupal\Component\Plugin\Exception\InvalidDerivativeClassException
+ * @expectedException \Drupal\Component\Plugin\Exception\InvalidDeriverException
*/
public function testInvalidDerivativeFetcher() {
$definitions = array();
// Do this with a class that doesn't implement the interface.
$definitions['invalid_discovery'] = array(
'id' => 'invalid_discovery',
- 'derivative' => '\Drupal\system\Tests\Plugin\DerivativeTest',
+ 'deriver' => '\Drupal\system\Tests\Plugin\DerivativeTest',
);
$this->discoveryMain->expects($this->any())
->method('getDefinitions')
@@ -126,7 +126,7 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase {
$definitions = array();
$definitions['non_container_aware_discovery'] = array(
'id' => 'non_container_aware_discovery',
- 'derivative' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
+ 'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
'string' => 'string',
'empty_string' => 'not_empty',
'array' => array('one', 'two'),
@@ -165,7 +165,7 @@ class DerivativeDiscoveryDecoratorTest extends UnitTestCase {
public function testSingleExistingDerivative() {
$base_definition = array(
'id' => 'non_container_aware_discovery',
- 'derivative' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
+ 'deriver' => '\Drupal\Tests\Core\Plugin\Discovery\TestDerivativeDiscovery',
'string' => 'string',
'empty_string' => 'not_empty',
'array' => array('one', 'two'),
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php
index 88bebf2..46ca62c 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestContainerDerivativeDiscovery.php
@@ -7,14 +7,14 @@
namespace Drupal\Tests\Core\Plugin\Discovery;
-use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface;
+use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines container test derivative discovery.
*/
-class TestContainerDerivativeDiscovery extends TestDerivativeDiscovery implements ContainerDerivativeInterface {
+class TestContainerDerivativeDiscovery extends TestDerivativeDiscovery implements ContainerDeriverInterface {
/**
* Constructs a TestContainerDerivativeDiscovery object.
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php
index f1bf083..633475a 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscovery.php
@@ -7,12 +7,12 @@
namespace Drupal\Tests\Core\Plugin\Discovery;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverInterface;
/**
* Defines test derivative discovery.
*/
-class TestDerivativeDiscovery implements DerivativeInterface {
+class TestDerivativeDiscovery implements DeriverInterface {
/**
* {@inheritdoc}
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php
index 1e7e5bc..9cab937 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php
@@ -7,12 +7,12 @@
namespace Drupal\Tests\Core\Plugin\Discovery;
-use Drupal\Component\Plugin\Derivative\DerivativeInterface;
+use Drupal\Component\Plugin\Derivative\DeriverInterface;
/**
* Defines test derivative discovery using an object..
*/
-class TestDerivativeDiscoveryWithObject implements DerivativeInterface {
+class TestDerivativeDiscoveryWithObject implements DeriverInterface {
/**
* {@inheritdoc}