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