You are here

public function ReplaceOp::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 composer/Plugin/Scaffold/Operations/ReplaceOp.php \Drupal\Composer\Plugin\Scaffold\Operations\ReplaceOp::__construct()
  2. 10 composer/Plugin/Scaffold/Operations/ReplaceOp.php \Drupal\Composer\Plugin\Scaffold\Operations\ReplaceOp::__construct()

Constructs a ReplaceOp.

Parameters

\Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath $sourcePath: The relative path to the source file.

bool $overwrite: Whether to allow this scaffold file to overwrite files already at the destination. Defaults to TRUE.

File

composer/Plugin/Scaffold/Operations/ReplaceOp.php, line 45

Class

ReplaceOp
Scaffold operation to copy or symlink from source to destination.

Namespace

Drupal\Composer\Plugin\Scaffold\Operations

Code

public function __construct(ScaffoldFilePath $sourcePath, $overwrite = TRUE) {
  $this->source = $sourcePath;
  $this->overwrite = $overwrite;
}