You are here

protected function Handler::getFileMappingsFromPackages in Drupal 8

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

Gets a consolidated list of file mappings from all allowed packages.

Parameters

\Composer\Package\Package[] $allowed_packages: A multidimensional array of file mappings, as returned by self::getAllowedPackages().

Return value

\Drupal\Composer\Plugin\Scaffold\Operations\OperationInterface[][] An array of destination paths => scaffold operation objects.

1 call to Handler::getFileMappingsFromPackages()
Handler::scaffold in composer/Plugin/Scaffold/Handler.php
Copies all scaffold files from source to destination.

File

composer/Plugin/Scaffold/Handler.php, line 207

Class

Handler
Core class of the plugin.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

protected function getFileMappingsFromPackages(array $allowed_packages) {
  $file_mappings = [];
  foreach ($allowed_packages as $package_name => $package) {
    $file_mappings[$package_name] = $this
      ->getPackageFileMappings($package);
  }
  return $file_mappings;
}