Skip to content
Snippets Groups Projects
Commit 15a3009e authored by Luke Leber's avatar Luke Leber
Browse files

Issue #3255830 by Luke.Leber: Remove no-op assignment from deriver plugin

parent 45223038
No related branches found
No related tags found
1 merge request!3Issue #3255830: Remove no-op assignment from deriver plugin
...@@ -37,9 +37,7 @@ class ConfigEntityReferenceSelection extends DeriverBase implements ContainerDer ...@@ -37,9 +37,7 @@ class ConfigEntityReferenceSelection extends DeriverBase implements ContainerDer
public function getDerivativeDefinitions($base_plugin_definition) { public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) { foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) {
if ($entity_type->entityClassImplements(ConfigEntityInterface::class)) { if ($entity_type->entityClassImplements(ConfigEntityInterface::class)) {
$entity_type_id = $entity_type->id();
$label = $this->t('Config: Filtered by specific @entity_type', ['@entity_type' => $entity_type->getPluralLabel()]); $label = $this->t('Config: Filtered by specific @entity_type', ['@entity_type' => $entity_type->getPluralLabel()]);
$this->derivatives[$entity_type_id] = $base_plugin_definition; $this->derivatives[$entity_type_id] = $base_plugin_definition;
$this->derivatives[$entity_type_id]['entity_types'] = [$entity_type_id]; $this->derivatives[$entity_type_id]['entity_types'] = [$entity_type_id];
$this->derivatives[$entity_type_id]['base_plugin_label'] = $label; $this->derivatives[$entity_type_id]['base_plugin_label'] = $label;
......
...@@ -44,10 +44,6 @@ class DeriverTest extends UnitTestCase { ...@@ -44,10 +44,6 @@ class DeriverTest extends UnitTestCase {
->method('entityClassImplements') ->method('entityClassImplements')
->willReturn(TRUE); ->willReturn(TRUE);
$config_entity_type
->method('id')
->willReturn('config_entity_type');
$config_entity_type $config_entity_type
->method('getPluralLabel') ->method('getPluralLabel')
->willReturn('Config entity types'); ->willReturn('Config entity types');
...@@ -59,8 +55,8 @@ class DeriverTest extends UnitTestCase { ...@@ -59,8 +55,8 @@ class DeriverTest extends UnitTestCase {
$entity_type_manager $entity_type_manager
->method('getDefinitions') ->method('getDefinitions')
->willReturn([ ->willReturn([
'test_content_entity' => $content_entity_type, 'content_entity_type' => $content_entity_type,
'test_config_entity' => $config_entity_type, 'config_entity_type' => $config_entity_type,
]); ]);
$container = new ContainerBuilder(); $container = new ContainerBuilder();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment