function FileCopy::__construct

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/process/FileCopy.php \Drupal\migrate\Plugin\migrate\process\FileCopy::__construct()
  2. 8.9.x core/modules/migrate/src/Plugin/migrate/process/FileCopy.php \Drupal\migrate\Plugin\migrate\process\FileCopy::__construct()
  3. 10 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 92

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.