diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php index d028e052d17fe93a40cc697937466abbc43297dc..0603e4ac18448afe068b02d369b21e2fb7007351 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php @@ -35,7 +35,7 @@ * \Drupal\Core\Config\Entity\ConfigEntityBase::calculateDependencies() which * resets the dependencies and provides an implementation to determine the * plugin providers for configuration entities that implement - * \Drupal\Core\Config\Entity\EntityWithPluginBagInterface. + * \Drupal\Core\Entity\EntityWithPluginBagsInterface. * * The configuration manager service provides methods to find dependencies for * a specified module, theme or configuration entity. diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php index 948ec6f4d1f6d393bd991c6ffe649b495eddb4b6..318ad7a8e705d2fd26ddb8c5c10433a71ff13e67 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php @@ -13,6 +13,7 @@ use Drupal\Core\Entity\Entity; use Drupal\Core\Config\ConfigDuplicateUUIDException; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\Core\Language\Language; use Drupal\Core\Plugin\PluginDependencyTrait; @@ -136,10 +137,11 @@ public function get($property_name) { * {@inheritdoc} */ public function set($property_name, $value) { - if ($this instanceof EntityWithPluginBagInterface) { - if ($property_name == $this->pluginConfigKey) { + if ($this instanceof EntityWithPluginBagsInterface) { + $plugin_bags = $this->getPluginBags(); + if (isset($plugin_bags[$property_name])) { // If external code updates the settings, pass it along to the plugin. - $this->getPluginBag()->setConfiguration($value); + $plugin_bags[$property_name]->setConfiguration($value); } } @@ -257,11 +259,12 @@ public function toArray() { public function preSave(EntityStorageInterface $storage) { parent::preSave($storage); - if ($this instanceof EntityWithPluginBagInterface) { + if ($this instanceof EntityWithPluginBagsInterface) { // Any changes to the plugin configuration must be saved to the entity's // copy as well. - $plugin_bag = $this->getPluginBag(); - $this->set($this->pluginConfigKey, $plugin_bag->getConfiguration()); + foreach ($this->getPluginBags() as $plugin_config_key => $plugin_bag) { + $this->set($plugin_config_key, $plugin_bag->getConfiguration()); + } } // Ensure this entity's UUID does not exist with a different ID, regardless @@ -297,14 +300,13 @@ public function calculateDependencies() { // Dependencies should be recalculated on every save. This ensures stale // dependencies are never saved. $this->dependencies = array(); - // @todo When \Drupal\Core\Config\Entity\EntityWithPluginBagInterface moves - // to a trait, switch to class_uses() instead. - if ($this instanceof EntityWithPluginBagInterface) { + if ($this instanceof EntityWithPluginBagsInterface) { // Configuration entities need to depend on the providers of any plugins // that they store the configuration for. - $plugin_bag = $this->getPluginBag(); - foreach ($plugin_bag as $instance) { - $this->calculatePluginDependencies($instance); + foreach ($this->getPluginBags() as $plugin_bag) { + foreach ($plugin_bag as $instance) { + $this->calculatePluginDependencies($instance); + } } } return $this->dependencies; diff --git a/core/lib/Drupal/Core/Config/Entity/EntityWithPluginBagInterface.php b/core/lib/Drupal/Core/Config/Entity/EntityWithPluginBagInterface.php deleted file mode 100644 index 0d409548850ed23c8ba7af6fbcdc82ffbb11bd52..0000000000000000000000000000000000000000 --- a/core/lib/Drupal/Core/Config/Entity/EntityWithPluginBagInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -<?php - -/** - * @file - * Contains \Drupal\Core\Config\Entity\EntityWithPluginBagInterface. - */ - -namespace Drupal\Core\Config\Entity; - -/** - * Provides an interface for an object utilizing a plugin bag. - * - * @see \Drupal\Component\Plugin\PluginBag - */ -interface EntityWithPluginBagInterface extends ConfigEntityInterface { - - /** - * Returns the plugin bag used by this entity. - * - * @return \Drupal\Component\Plugin\PluginBag - */ - public function getPluginBag(); - -} diff --git a/core/lib/Drupal/Core/Entity/EntityWithPluginBagsInterface.php b/core/lib/Drupal/Core/Entity/EntityWithPluginBagsInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a111c73b13c7fb9cefffa068bc828905218d322f --- /dev/null +++ b/core/lib/Drupal/Core/Entity/EntityWithPluginBagsInterface.php @@ -0,0 +1,26 @@ +<?php + +/** + * @file + * Contains \Drupal\Core\Entity\EntityWithPluginBagsInterface. + */ + +namespace Drupal\Core\Entity; + +/** + * Provides an interface for an object utilizing a plugin bag. + * + * @see \Drupal\Component\Plugin\PluginBag + */ +interface EntityWithPluginBagsInterface extends EntityInterface { + + /** + * Returns the plugin bags used by this entity. + * + * @return \Drupal\Component\Plugin\PluginBag[] + * An array of plugin bags, keyed by the property name they use to store + * their configuration. + */ + public function getPluginBags(); + +} diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php index decd0b17a04dcfb1d68e19c9c62420d90c770645..de6c9711fe791ea6682eb66c863b7be2e506dfa8 100644 --- a/core/modules/block/lib/Drupal/block/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Entity/Block.php @@ -12,7 +12,7 @@ use Drupal\block\BlockPluginBag; use Drupal\block\BlockInterface; use Drupal\Core\Config\Entity\ConfigEntityInterface; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\Core\Entity\EntityStorageInterface; /** @@ -42,7 +42,7 @@ * } * ) */ -class Block extends ConfigEntityBase implements BlockInterface, EntityWithPluginBagInterface { +class Block extends ConfigEntityBase implements BlockInterface, EntityWithPluginBagsInterface { /** * The ID of the block. @@ -86,11 +86,6 @@ class Block extends ConfigEntityBase implements BlockInterface, EntityWithPlugin */ protected $pluginBag; - /** - * {@inheritdoc} - */ - protected $pluginConfigKey = 'settings'; - /** * The visibility settings. * @@ -106,15 +101,25 @@ public function getPlugin() { } /** - * {@inheritdoc} + * Encapsulates the creation of the block's PluginBag. + * + * @return \Drupal\Component\Plugin\PluginBag + * The block's plugin bag. */ - public function getPluginBag() { + protected function getPluginBag() { if (!$this->pluginBag) { $this->pluginBag = new BlockPluginBag(\Drupal::service('plugin.manager.block'), $this->plugin, $this->get('settings'), $this->id()); } return $this->pluginBag; } + /** + * {@inheritdoc} + */ + public function getPluginBags() { + return array('settings' => $this->getPluginBag()); + } + /** * Overrides \Drupal\Core\Entity\Entity::label(); */ diff --git a/core/modules/block/tests/Drupal/block/Tests/BlockConfigEntityUnitTest.php b/core/modules/block/tests/Drupal/block/Tests/BlockConfigEntityUnitTest.php index 98d8d6dce84c3837f14082b45aa6b5842d8c8750..76b9a3004066eb0ed4a4569955bca1bcd109a141 100644 --- a/core/modules/block/tests/Drupal/block/Tests/BlockConfigEntityUnitTest.php +++ b/core/modules/block/tests/Drupal/block/Tests/BlockConfigEntityUnitTest.php @@ -88,10 +88,10 @@ public function setUp() { */ public function testCalculateDependencies() { $values = array('theme' => 'stark'); - // Mock the entity under test so that we can mock getPluginBag(). + // Mock the entity under test so that we can mock getPluginBags(). $entity = $this->getMockBuilder('\Drupal\block\Entity\Block') ->setConstructorArgs(array($values, $this->entityTypeId)) - ->setMethods(array('getPluginBag')) + ->setMethods(array('getPluginBags')) ->getMock(); // Create a configurable plugin that would add a dependency. $instance_id = $this->randomName(); @@ -110,8 +110,8 @@ public function testCalculateDependencies() { // Return the mocked plugin bag. $entity->expects($this->once()) - ->method('getPluginBag') - ->will($this->returnValue($plugin_bag)); + ->method('getPluginBags') + ->will($this->returnValue(array($plugin_bag))); $dependencies = $entity->calculateDependencies(); $this->assertContains('test', $dependencies['module']); diff --git a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php index 40aff70de5c36998d2eb3d104f60f0babf3cb20e..0d244e3fc99162dd0def029f9815e55c6a2d23a2 100644 --- a/core/modules/editor/lib/Drupal/editor/Entity/Editor.php +++ b/core/modules/editor/lib/Drupal/editor/Entity/Editor.php @@ -95,7 +95,7 @@ public function calculateDependencies() { parent::calculateDependencies(); // Create a dependency on the associated FilterFormat. $this->addDependency('entity', $this->getFilterFormat()->getConfigDependencyName()); - // @todo use EntityWithPluginBagInterface so configuration between config + // @todo use EntityWithPluginBagsInterface so configuration between config // entity and dependency on provider is managed automatically. $definition = $this->editorPluginManager()->createInstance($this->editor)->getPluginDefinition(); $this->addDependency('module', $definition['provider']); diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php index ff6954f83f0f168b5b6867fca0311165e330e5c0..6f5f8073e48af19ffe75e750ffaf0cb624f097fa 100644 --- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php +++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php @@ -8,7 +8,7 @@ namespace Drupal\filter\Entity; use Drupal\Core\Config\Entity\ConfigEntityBase; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\filter\FilterFormatInterface; use Drupal\filter\FilterBag; @@ -43,7 +43,7 @@ * } * ) */ -class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, EntityWithPluginBagInterface { +class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, EntityWithPluginBagsInterface { /** * Unique machine name of the format. @@ -125,11 +125,6 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En */ protected $filterBag; - /** - * {@inheritdoc} - */ - protected $pluginConfigKey = 'filters'; - /** * {@inheritdoc} */ @@ -141,22 +136,21 @@ public function id() { * {@inheritdoc} */ public function filters($instance_id = NULL) { - $filter_bag = $this->getPluginBag(); + if (!isset($this->filterBag)) { + $this->filterBag = new FilterBag(\Drupal::service('plugin.manager.filter'), $this->filters); + $this->filterBag->sort(); + } if (isset($instance_id)) { - return $filter_bag->get($instance_id); + return $this->filterBag->get($instance_id); } - return $filter_bag; + return $this->filterBag; } /** * {@inheritdoc} */ - public function getPluginBag() { - if (!isset($this->filterBag)) { - $this->filterBag = new FilterBag(\Drupal::service('plugin.manager.filter'), $this->filters); - $this->filterBag->sort(); - } - return $this->filterBag; + public function getPluginBags() { + return array('filters' => $this->filters()); } /** diff --git a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php index 4eaa2ec9867246dcf786cf841eab41d7a12b19d8..6bd4a402384c10ce5233fc6faf5f02f6e39467d0 100644 --- a/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php +++ b/core/modules/image/lib/Drupal/image/Entity/ImageStyle.php @@ -9,8 +9,8 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\Config\Entity\ConfigEntityBase; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\Core\Routing\RequestHelper; use Drupal\image\ImageEffectBag; use Drupal\image\ImageEffectInterface; @@ -47,7 +47,7 @@ * } * ) */ -class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, EntityWithPluginBagInterface { +class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, EntityWithPluginBagsInterface { /** * The name of the image style to use as replacement upon delete. @@ -84,11 +84,6 @@ class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, Entity */ protected $effectsBag; - /** - * {@inheritdoc} - */ - protected $pluginConfigKey = 'effects'; - /** * Overrides Drupal\Core\Entity\Entity::id(). */ @@ -347,8 +342,8 @@ public function getEffects() { /** * {@inheritdoc} */ - public function getPluginBag() { - return $this->getEffects(); + public function getPluginBags() { + return array('effects' => $this->getEffects()); } /** diff --git a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php index 3e1fb70d45c08c856b668d8bd2bc19e6b8ca705b..f1b92cde22c29a2973020bd7bf59458bde504410 100644 --- a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php +++ b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php @@ -9,9 +9,9 @@ use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityInterface; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Component\Plugin\ConfigurablePluginInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\search\Plugin\SearchIndexingInterface; use Drupal\search\Plugin\SearchPluginBag; use Drupal\search\SearchPageInterface; @@ -50,7 +50,7 @@ * } * ) */ -class SearchPage extends ConfigEntityBase implements SearchPageInterface, EntityWithPluginBagInterface { +class SearchPage extends ConfigEntityBase implements SearchPageInterface, EntityWithPluginBagsInterface { /** * The name (plugin ID) of the search page entity. @@ -103,11 +103,6 @@ class SearchPage extends ConfigEntityBase implements SearchPageInterface, Entity */ protected $pluginBag; - /** - * {@inheritdoc} - */ - protected $pluginConfigKey = 'configuration'; - /** * {@inheritdoc} */ @@ -116,15 +111,25 @@ public function getPlugin() { } /** - * {@inheritdoc} + * Encapsulates the creation of the search page's PluginBag. + * + * @return \Drupal\Component\Plugin\PluginBag + * The search page's plugin bag. */ - public function getPluginBag() { + protected function getPluginBag() { if (!$this->pluginBag) { $this->pluginBag = new SearchPluginBag($this->searchPluginManager(), $this->plugin, $this->configuration, $this->id()); } return $this->pluginBag; } + /** + * {@inheritdoc} + */ + public function getPluginBags() { + return array('configuration' => $this->getPluginBag()); + } + /** * {@inheritdoc} */ diff --git a/core/modules/system/lib/Drupal/system/Entity/Action.php b/core/modules/system/lib/Drupal/system/Entity/Action.php index 6bc101f07aecfb2c8d4854cd69b0770816c0c102..642933a289bb45a35337e504a09daf9d39f1fe14 100644 --- a/core/modules/system/lib/Drupal/system/Entity/Action.php +++ b/core/modules/system/lib/Drupal/system/Entity/Action.php @@ -9,7 +9,7 @@ use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\Core\Config\Entity\ConfigEntityInterface; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\system\ActionConfigEntityInterface; use Drupal\Core\Action\ActionBag; use Drupal\Component\Plugin\ConfigurablePluginInterface; @@ -27,7 +27,7 @@ * } * ) */ -class Action extends ConfigEntityBase implements ActionConfigEntityInterface, EntityWithPluginBagInterface { +class Action extends ConfigEntityBase implements ActionConfigEntityInterface, EntityWithPluginBagsInterface { /** * The name (plugin ID) of the action. @@ -72,20 +72,25 @@ class Action extends ConfigEntityBase implements ActionConfigEntityInterface, En protected $pluginBag; /** - * {@inheritdoc} - */ - protected $pluginConfigKey = 'configuration'; - - /** - * {@inheritdoc} + * Encapsulates the creation of the action's PluginBag. + * + * @return \Drupal\Component\Plugin\PluginBag + * The action's plugin bag. */ - public function getPluginBag() { + protected function getPluginBag() { if (!$this->pluginBag) { $this->pluginBag = new ActionBag(\Drupal::service('plugin.manager.action'), $this->plugin, $this->configuration); } return $this->pluginBag; } + /** + * {@inheritdoc} + */ + public function getPluginBags() { + return array('configuration' => $this->getPluginBag()); + } + /** * {@inheritdoc} */ diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityImportTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityImportTest.php index 2d3def712acf6dc7c5c5ab73becbf7ecd53520e8..5fb79fbb56137d47a0b0b0e7e7f02bafd305a2fb 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityImportTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/ConfigEntityImportTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Entity; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; use Drupal\simpletest\WebTestBase; /** @@ -101,7 +101,7 @@ protected function doFilterFormatUpdate() { /** @var $entity \Drupal\filter\Entity\FilterFormat */ $entity = entity_load('filter_format', 'plain_text'); - $plugin_bag = $entity->getPluginBag(); + $plugin_bag = $entity->getPluginBags()['filters']; $filters = $entity->get('filters'); $this->assertIdentical(72, $filters['filter_url']['settings']['filter_url_length']); @@ -113,7 +113,7 @@ protected function doFilterFormatUpdate() { $this->assertIdentical($filters, $plugin_bag->getConfiguration()); $filters['filter_url']['settings']['filter_url_length'] = -100; - $entity->getPluginBag()->setConfiguration($filters); + $entity->getPluginBags()['filters']->setConfiguration($filters); $entity->save(); $this->assertIdentical($filters, $entity->get('filters')); $this->assertIdentical($filters, $plugin_bag->getConfiguration()); @@ -133,7 +133,7 @@ protected function doImageStyleUpdate() { /** @var $entity \Drupal\image\Entity\ImageStyle */ $entity = entity_load('image_style', 'thumbnail'); - $plugin_bag = $entity->getPluginBag(); + $plugin_bag = $entity->getPluginBags()['effects']; $effects = $entity->get('effects'); $effect_id = key($effects); @@ -147,7 +147,7 @@ protected function doImageStyleUpdate() { $this->assertIdentical($effects, $plugin_bag->getConfiguration()); $effects[$effect_id]['data']['height'] = -50; - $entity->getPluginBag()->setConfiguration($effects); + $entity->getPluginBags()['effects']->setConfiguration($effects); $entity->save(); // Ensure the entity and plugin have the correct configuration. $this->assertIdentical($effects, $entity->get('effects')); @@ -184,7 +184,7 @@ protected function doSearchPageUpdate() { /** * Tests that a single set of plugin config stays in sync. * - * @param \Drupal\Core\Config\Entity\EntityWithPluginBagInterface $entity + * @param \Drupal\Core\Entity\EntityWithPluginBagsInterface $entity * The entity. * @param string $config_key * Where the plugin config is stored. @@ -193,8 +193,8 @@ protected function doSearchPageUpdate() { * @param mixed $expected * The expected default value of the plugin config setting. */ - protected function checkSinglePluginConfigSync(EntityWithPluginBagInterface $entity, $config_key, $setting_key, $expected) { - $plugin_bag = $entity->getPluginBag(); + protected function checkSinglePluginConfigSync(EntityWithPluginBagsInterface $entity, $config_key, $setting_key, $expected) { + $plugin_bag = $entity->getPluginBags()[$config_key]; $settings = $entity->get($config_key); // Ensure the default config exists. diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php index 3c52f73988fc192548ace7161ec62809c503e3df..4f718fc1bfa16a30b570e05e09d1c0445e66ada2 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php @@ -210,13 +210,13 @@ public function testAddDependency() { /** * @covers ::calculateDependencies * - * @dataProvider providerCalculateDependenciesWithPluginBag + * @dataProvider providerCalculateDependenciesWithPluginBags */ - public function testCalculateDependenciesWithPluginBag($definition, $expected_dependencies) { + public function testCalculateDependenciesWithPluginBags($definition, $expected_dependencies) { $values = array(); - $this->entity = $this->getMockBuilder('\Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginBag') + $this->entity = $this->getMockBuilder('\Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginBags') ->setConstructorArgs(array($values, $this->entityTypeId)) - ->setMethods(array('getPluginBag')) + ->setMethods(array('getPluginBags')) ->getMock(); // Create a configurable plugin that would add a dependency. @@ -236,18 +236,18 @@ public function testCalculateDependenciesWithPluginBag($definition, $expected_de // Return the mocked plugin bag. $this->entity->expects($this->once()) - ->method('getPluginBag') - ->will($this->returnValue($pluginBag)); + ->method('getPluginBags') + ->will($this->returnValue(array($pluginBag))); $this->assertEquals($expected_dependencies, $this->entity->calculateDependencies()); } /** - * Data provider for testCalculateDependenciesWithPluginBag. + * Data provider for testCalculateDependenciesWithPluginBags. * * @return array */ - public function providerCalculateDependenciesWithPluginBag() { + public function providerCalculateDependenciesWithPluginBags() { // Start with 'a' so that order of the dependency array is fixed. $instance_dependency_1 = 'a' . $this->randomName(10); $instance_dependency_2 = 'a' . $this->randomName(11); diff --git a/core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/ConfigEntityBaseWithPluginBag.php b/core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/ConfigEntityBaseWithPluginBags.php similarity index 62% rename from core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/ConfigEntityBaseWithPluginBag.php rename to core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/ConfigEntityBaseWithPluginBags.php index 85a7f1039b7031939d1ef77bcf95987f6034baee..72bc9fc6b9d0d49ae2cfae066200e1dd0f81684f 100644 --- a/core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/ConfigEntityBaseWithPluginBag.php +++ b/core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/ConfigEntityBaseWithPluginBags.php @@ -2,19 +2,19 @@ /** * @file - * Contains \Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginBag. + * Contains \Drupal\Tests\Core\Config\Entity\Fixtures\ConfigEntityBaseWithPluginBags. */ namespace Drupal\Tests\Core\Config\Entity\Fixtures; use Drupal\Core\Config\Entity\ConfigEntityBase; -use Drupal\Core\Config\Entity\EntityWithPluginBagInterface; +use Drupal\Core\Entity\EntityWithPluginBagsInterface; /** * Enables testing of dependency calculation. * - * @see \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testCalculateDependenciesWithPluginBag() + * @see \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testCalculateDependenciesWithPluginBags() * @see \Drupal\Core\Config\Entity\ConfigEntityBase::calculateDependencies() */ -abstract class ConfigEntityBaseWithPluginBag extends ConfigEntityBase implements EntityWithPluginBagInterface { +abstract class ConfigEntityBaseWithPluginBags extends ConfigEntityBase implements EntityWithPluginBagsInterface { }