Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileCopy.php

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal