Skip to content
Snippets Groups Projects

Added test coverage.

Files

@@ -8,6 +8,7 @@ use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Field\FieldTypePluginManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
@@ -77,13 +78,16 @@ class ConfigEntityReference extends FieldTargetBase implements ConfigurableTarge
* The transliteration manager.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config_manager
* The manager for managing config schema type plugins.
* @param \Drupal\Core\Field\FieldTypePluginManagerInterface|null $field_type_plugin_manager
* (optional) The field type plugin manager. Passing this argument will be
* required in feeds:4.0.0; omitting it is deprecated since feeds:3.1.0.
*/
public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFinderInterface $entity_finder, TransliterationInterface $transliteration, TypedConfigManagerInterface $typed_config_manager) {
public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityFinderInterface $entity_finder, TransliterationInterface $transliteration, TypedConfigManagerInterface $typed_config_manager, ?FieldTypePluginManagerInterface $field_type_plugin_manager = NULL) {
$this->entityTypeManager = $entity_type_manager;
$this->entityFinder = $entity_finder;
$this->transliteration = $transliteration;
$this->typedConfigManager = $typed_config_manager;
parent::__construct($configuration, $plugin_id, $plugin_definition);
parent::__construct($configuration, $plugin_id, $plugin_definition, $field_type_plugin_manager);
}
/**
@@ -97,7 +101,8 @@ class ConfigEntityReference extends FieldTargetBase implements ConfigurableTarge
$container->get('entity_type.manager'),
$container->get('feeds.entity_finder'),
$container->get('transliteration'),
$container->get('config.typed')
$container->get('config.typed'),
$container->get('plugin.manager.field.field_type'),
);
}
Loading