public static function ScaffoldFileCollection::process in Drupal 9
Same name and namespace in other branches
- 8 composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::process()
Processes the iterator created by ScaffoldFileCollection::create().
@deprecated. Called when upgrading from the Core Composer Scaffold plugin version 8.8.x due to a bug in the plugin and handler classes. Do not use in 8.9.x or 9.x, and remove in Drupal 10.x.
Parameters
\Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection $collection: The iterator to process.
\Composer\IO\IOInterface $io: The Composer IO object.
\Drupal\Composer\Plugin\Scaffold\ScaffoldOptions $scaffold_options: The scaffold options.
Return value
\Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldResult[] The results array.
File
- composer/
Plugin/ Scaffold/ Operations/ ScaffoldFileCollection.php, line 161
Class
- ScaffoldFileCollection
- Collection of scaffold files.
Namespace
Drupal\Composer\Plugin\Scaffold\OperationsCode
public static function process(ScaffoldFileCollection $collection, IOInterface $io, ScaffoldOptions $scaffold_options) {
$results = [];
foreach ($collection as $project_name => $scaffold_files) {
$io
->write("Scaffolding files for <comment>{$project_name}</comment>:");
foreach ($scaffold_files as $scaffold_file) {
$results[$scaffold_file
->destination()
->relativePath()] = $scaffold_file
->process($io, $scaffold_options);
}
}
return $results;
}