function AllowedPackages::getPackage
Same name in other branches
- 9 composer/Plugin/Scaffold/AllowedPackages.php \Drupal\Composer\Plugin\Scaffold\AllowedPackages::getPackage()
- 10 composer/Plugin/Scaffold/AllowedPackages.php \Drupal\Composer\Plugin\Scaffold\AllowedPackages::getPackage()
- 11.x composer/Plugin/Scaffold/AllowedPackages.php \Drupal\Composer\Plugin\Scaffold\AllowedPackages::getPackage()
Retrieves a package from the current composer process.
Parameters
string $name: Name of the package to get from the current composer installation.
Return value
\Composer\Package\PackageInterface|null The Composer package.
1 call to AllowedPackages::getPackage()
- AllowedPackages::recursiveGetAllowedPackages in composer/
Plugin/ Scaffold/ AllowedPackages.php - Builds a name-to-package mapping from a list of package names.
File
-
composer/
Plugin/ Scaffold/ AllowedPackages.php, line 213
Class
- AllowedPackages
- Determine recursively which packages have been allowed to scaffold files.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
protected function getPackage($name) {
return $this->composer
->getRepositoryManager()
->getLocalRepository()
->findPackage($name, '*');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.