function Handler::getVendorPath

Same name in other branches
  1. 8.9.x composer/Plugin/Scaffold/Handler.php \Drupal\Composer\Plugin\Scaffold\Handler::getVendorPath()
  2. 10 composer/Plugin/Scaffold/Handler.php \Drupal\Composer\Plugin\Scaffold\Handler::getVendorPath()
  3. 11.x composer/Plugin/Scaffold/Handler.php \Drupal\Composer\Plugin\Scaffold\Handler::getVendorPath()

Gets the path to the 'vendor' directory.

Return value

string The file path of the vendor directory.

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

File

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

Class

Handler
Core class of the plugin.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

protected function getVendorPath() {
    $vendor_dir = $this->composer
        ->getConfig()
        ->get('vendor-dir');
    $filesystem = new Filesystem();
    return $filesystem->normalizePath(realpath($vendor_dir));
}

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