function Handler::getFileMappingsFromPackages

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

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