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

Breadcrumb

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

function BaseInstaller::mapCustomInstallPaths

Search through a passed paths array for a custom install path.

Parameters

array<string, string[]|string> $paths:

Return value

string|false

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

File

vendor/composer/installers/src/Composer/Installers/BaseInstaller.php, line 116

Class

BaseInstaller

Namespace

Composer\Installers

Code

protected function mapCustomInstallPaths(array $paths, string $name, string $type, ?string $vendor = null) {
    foreach ($paths as $path => $names) {
        $names = (array) $names;
        if (in_array($name, $names) || in_array('type:' . $type, $names) || in_array('vendor:' . $vendor, $names)) {
            return $path;
        }
    }
    return false;
}

API Navigation

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