Skip to content
Snippets Groups Projects
Commit 2443d0b8 authored by Youri van Koppen's avatar Youri van Koppen Committed by Sascha Grossenbacher
Browse files

Issue #3454863 by MegaChriz: Remove usage of deprecated FeedsAnnotationFactory

parent c711de93
No related branches found
No related tags found
1 merge request!122Use ContainerFactoryPluginInterface instead of annotation for dependency injection.
Pipeline #245643 passed with warnings
...@@ -8,6 +8,7 @@ use Drupal\Core\Form\FormStateInterface; ...@@ -8,6 +8,7 @@ use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface; use Drupal\Core\Session\AccountInterface;
use Drupal\feeds\Feeds\Target\Text; use Drupal\feeds\Feeds\Target\Text;
use Drupal\feeds\Plugin\Type\Target\ConfigurableTargetInterface; use Drupal\feeds\Plugin\Type\Target\ConfigurableTargetInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/** /**
* Feeds target plugin for Paragraphs fields. * Feeds target plugin for Paragraphs fields.
...@@ -15,7 +16,6 @@ use Drupal\feeds\Plugin\Type\Target\ConfigurableTargetInterface; ...@@ -15,7 +16,6 @@ use Drupal\feeds\Plugin\Type\Target\ConfigurableTargetInterface;
* @FeedsTarget( * @FeedsTarget(
* id = "paragraphs", * id = "paragraphs",
* field_types = {"entity_reference_revisions"}, * field_types = {"entity_reference_revisions"},
* arguments = {"@entity_type.manager", "@current_user"}
* ) * )
*/ */
class Paragraphs extends Text implements ConfigurableTargetInterface { class Paragraphs extends Text implements ConfigurableTargetInterface {
...@@ -51,6 +51,19 @@ class Paragraphs extends Text implements ConfigurableTargetInterface { ...@@ -51,6 +51,19 @@ class Paragraphs extends Text implements ConfigurableTargetInterface {
$this->fieldConfigStorage = $entity_type_manager->getStorage('field_config'); $this->fieldConfigStorage = $entity_type_manager->getStorage('field_config');
} }
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$configuration,
$plugin_id,
$plugin_definition,
$container->get('entity_type.manager'),
$container->get('current_user'),
);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment