function ReplaceOp::__construct

Same name in other branches
  1. 9 composer/Plugin/Scaffold/Operations/ReplaceOp.php \Drupal\Composer\Plugin\Scaffold\Operations\ReplaceOp::__construct()
  2. 8.9.x composer/Plugin/Scaffold/Operations/ReplaceOp.php \Drupal\Composer\Plugin\Scaffold\Operations\ReplaceOp::__construct()
  3. 11.x 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;
}

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