You are here

public function Download::__construct in Drupal 10

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

Constructs a download process plugin.

Parameters

array $configuration: The plugin configuration.

string $plugin_id: The plugin ID.

array $plugin_definition: The plugin definition.

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

\GuzzleHttp\ClientInterface $http_client: The HTTP client.

Overrides FileProcessBase::__construct

File

core/modules/migrate/src/Plugin/migrate/process/Download.php, line 89

Class

Download
Downloads a file from a HTTP(S) remote location into the local file system.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, FileSystemInterface $file_system, ClientInterface $http_client) {
  $configuration += [
    'guzzle_options' => [],
  ];
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->fileSystem = $file_system;
  $this->httpClient = $http_client;
}