function ScaffoldFileCollection::processScaffoldFiles

Same name in other branches
  1. 9 composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::processScaffoldFiles()
  2. 8.9.x composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::processScaffoldFiles()
  3. 10 composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php \Drupal\Composer\Plugin\Scaffold\Operations\ScaffoldFileCollection::processScaffoldFiles()

Processes the files in our collection.

Parameters

\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 133

Class

ScaffoldFileCollection
Collection of scaffold files.

Namespace

Drupal\Composer\Plugin\Scaffold\Operations

Code

public function processScaffoldFiles(IOInterface $io, ScaffoldOptions $scaffold_options) {
    $results = [];
    foreach ($this 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;
}

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