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

Breadcrumb

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

function Installer::getInstallPath

Overrides LibraryInstaller::getInstallPath

File

vendor/composer/installers/src/Composer/Installers/Installer.php, line 139

Class

Installer

Namespace

Composer\Installers

Code

public function getInstallPath(PackageInterface $package) {
    $type = $package->getType();
    $frameworkType = $this->findFrameworkType($type);
    if ($frameworkType === false) {
        throw new \InvalidArgumentException('Sorry the package type of this package is not yet supported.');
    }
    $class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
    
    /**
     * @var BaseInstaller
     */
    $installer = new $class($package, $this->composer, $this->getIO());
    $path = $installer->getInstallPath($package, $frameworkType);
    if (!$this->filesystem
        ->isAbsolutePath($path)) {
        $path = getcwd() . '/' . $path;
    }
    return $path;
}

API Navigation

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