You are here

public function FileCopy::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/process/FileCopy.php \Drupal\migrate\Plugin\migrate\process\FileCopy::__construct()

Constructs a file_copy process plugin.

Parameters

array $configuration: The plugin configuration.

string $plugin_id: The plugin ID.

array $plugin_definition: The plugin definition.

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

\Drupal\Core\File\FileSystemInterface $file_system: The file system service.

\Drupal\migrate\Plugin\MigrateProcessInterface $download_plugin: An instance of the download plugin for handling remote URIs.

Overrides FileProcessBase::__construct

File

core/modules/migrate/src/Plugin/migrate/process/FileCopy.php, line 93

Class

FileCopy
Copies or moves a local file from one place into another.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, StreamWrapperManagerInterface $stream_wrappers, FileSystemInterface $file_system, MigrateProcessInterface $download_plugin) {
  $configuration += [
    'move' => FALSE,
  ];
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->streamWrapperManager = $stream_wrappers;
  $this->fileSystem = $file_system;
  $this->downloadPlugin = $download_plugin;
}