From 85f243e204457fac9f5fa94d13410ff75b2d36ee Mon Sep 17 00:00:00 2001 From: webchick Date: Tue, 20 May 2014 14:04:40 -0700 Subject: [PATCH] Issue #2267329 by tim.plunkett | joachim: Move EntityWithPluginBagInterface out of Drupal\Core\Config\Entity and make it useful for more than one bag. --- .../Config/Entity/ConfigDependencyManager.php | 2 +- .../Core/Config/Entity/ConfigEntityBase.php | 26 +++++++++-------- .../Entity/EntityWithPluginBagInterface.php | 24 ---------------- .../Entity/EntityWithPluginBagsInterface.php | 26 +++++++++++++++++ .../block/lib/Drupal/block/Entity/Block.php | 23 +++++++++------ .../block/Tests/BlockConfigEntityUnitTest.php | 8 +++--- .../lib/Drupal/editor/Entity/Editor.php | 2 +- .../lib/Drupal/filter/Entity/FilterFormat.php | 28 ++++++++----------- .../lib/Drupal/image/Entity/ImageStyle.php | 13 +++------ .../lib/Drupal/search/Entity/SearchPage.php | 23 +++++++++------ .../lib/Drupal/system/Entity/Action.php | 23 +++++++++------ .../Tests/Entity/ConfigEntityImportTest.php | 16 +++++------ .../Entity/ConfigEntityBaseUnitTest.php | 16 +++++------ ...php => ConfigEntityBaseWithPluginBags.php} | 8 +++--- 14 files changed, 123 insertions(+), 115 deletions(-) delete mode 100644 core/lib/Drupal/Core/Config/Entity/EntityWithPluginBagInterface.php create mode 100644 core/lib/Drupal/Core/Entity/EntityWithPluginBagsInterface.php rename core/tests/Drupal/Tests/Core/Config/Entity/Fixtures/{ConfigEntityBaseWithPluginBag.php => ConfigEntityBaseWithPluginBags.php} (62%) diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php index d028e052d17..0603e4ac184 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigDependencyManager.php @@ -35,7 +35,7 @@ use Drupal\Component\Utility\SortArray; * \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 948ec6f4d1f..318ad7a8e70 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\Cache\Cache; 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 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface * {@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 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface 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 @@ abstract class ConfigEntityBase extends Entity implements ConfigEntityInterface // 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 0d409548850..00000000000 --- a/core/lib/Drupal/Core/Config/Entity/EntityWithPluginBagInterface.php +++ /dev/null @@ -1,24 +0,0 @@ -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 98d8d6dce84..76b9a300406 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 @@ class BlockConfigEntityUnitTest extends UnitTestCase { */ 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 @@ class BlockConfigEntityUnitTest extends UnitTestCase { // 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 40aff70de5c..0d244e3fc99 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 @@ class Editor extends ConfigEntityBase implements EditorInterface { 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 ff6954f83f0..6f5f8073e48 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 @@ use Drupal\filter\Plugin\FilterInterface; * } * ) */ -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 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En * {@inheritdoc} */ public function filters($instance_id = NULL) { - $filter_bag = $this->getPluginBag(); - if (isset($instance_id)) { - return $filter_bag->get($instance_id); + if (!isset($this->filterBag)) { + $this->filterBag = new FilterBag(\Drupal::service('plugin.manager.filter'), $this->filters); + $this->filterBag->sort(); } - return $filter_bag; + if (isset($instance_id)) { + return $this->filterBag->get($instance_id); + } + 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 4eaa2ec9867..6bd4a402384 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 @@ namespace Drupal\image\Entity; 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 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; * } * ) */ -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 @@ class ImageStyle extends ConfigEntityBase implements ImageStyleInterface, Entity /** * {@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 3e1fb70d45c..f1b92cde22c 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 @@ namespace Drupal\search\Entity; 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 @@ use Drupal\search\SearchPageInterface; * } * ) */ -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 @@ class SearchPage extends ConfigEntityBase implements SearchPageInterface, Entity } /** - * {@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 6bc101f07ae..642933a289b 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 @@ namespace Drupal\system\Entity; 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 @@ use Drupal\Component\Plugin\ConfigurablePluginInterface; * } * ) */ -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} + * Encapsulates the creation of the action's PluginBag. + * + * @return \Drupal\Component\Plugin\PluginBag + * The action's plugin bag. */ - protected $pluginConfigKey = 'configuration'; - - /** - * {@inheritdoc} - */ - 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 2d3def712ac..5fb79fbb561 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 @@ class ConfigEntityImportTest extends WebTestBase { /** @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 @@ class ConfigEntityImportTest extends WebTestBase { $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 @@ class ConfigEntityImportTest extends WebTestBase { /** @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 @@ class ConfigEntityImportTest extends WebTestBase { $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 @@ class ConfigEntityImportTest extends WebTestBase { /** * 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 @@ class ConfigEntityImportTest extends WebTestBase { * @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 3c52f73988f..4f718fc1bfa 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 @@ class ConfigEntityBaseUnitTest extends UnitTestCase { /** * @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 @@ class ConfigEntityBaseUnitTest extends UnitTestCase { // 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 85a7f1039b7..72bc9fc6b9d 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 { }