You are here

public function UploadFetcher::__construct in Feeds 8.3

Constructs an UploadFetcher object.

Parameters

array $configuration: The plugin configuration.

string $plugin_id: The plugin id.

array $plugin_definition: The plugin definition.

\Drupal\file\FileUsage\FileUsageInterface $file_usage: The file usage backend.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager: The stream wrapper manager.

Overrides PluginBase::__construct

File

src/Feeds/Fetcher/UploadFetcher.php, line 70

Class

UploadFetcher
Defines a file upload fetcher.

Namespace

Drupal\feeds\Feeds\Fetcher

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, FileUsageInterface $file_usage, EntityTypeManagerInterface $entity_type_manager, StreamWrapperManagerInterface $stream_wrapper_manager) {
  $this->fileUsage = $file_usage;
  $this->fileStorage = $entity_type_manager
    ->getStorage('file');
  $this->streamWrapperManager = $stream_wrapper_manager;
  parent::__construct($configuration, $plugin_id, $plugin_definition);
}