Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AllowedPackages.php

function 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 191

Class

AllowedPackages
Determine recursively which packages have been allowed to scaffold files.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

protected function getPackage($name) {
    return $this->composer
        ->getRepositoryManager()
        ->getLocalRepository()
        ->findPackage($name, '*');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal