You are here

protected function ScaffoldOptions::__construct in Drupal 10

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

ScaffoldOptions constructor.

Parameters

array $options: The scaffold options taken from the 'drupal-scaffold' section.

File

composer/Plugin/Scaffold/ScaffoldOptions.php, line 29

Class

ScaffoldOptions
Per-project options from the 'extras' section of the composer.json file.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

protected function __construct(array $options) {
  $this->options = $options + [
    "allowed-packages" => [],
    "locations" => [],
    "symlink" => FALSE,
    "file-mapping" => [],
  ];

  // Define any default locations.
  $this->options['locations'] += [
    'project-root' => '.',
    'web-root' => '.',
  ];
}