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

Breadcrumb

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

function OxidInstaller::prepareVendorDirectory

Makes sure there is a vendormetadata.php file inside the vendor folder if there is a vendor folder.

1 call to OxidInstaller::prepareVendorDirectory()
OxidInstaller::getInstallPath in vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
Return the install path based on package type.

File

vendor/composer/installers/src/Composer/Installers/OxidInstaller.php, line 32

Class

OxidInstaller

Namespace

Composer\Installers

Code

protected function prepareVendorDirectory(string $installPath) : void {
    $matches = '';
    $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
    if (!$hasVendorDirectory) {
        return;
    }
    $vendorDirectory = $matches['vendor'];
    $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
    if (!file_exists($vendorPath)) {
        mkdir($vendorPath, 0755, true);
    }
    $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
    touch($vendorMetaDataPath);
}

API Navigation

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