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

Breadcrumb

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

function Package::convertLinksToMap

Parameters

array<int, Link> $links:

Return value

array<string, Link>

5 calls to Package::convertLinksToMap()
Package::setConflicts in vendor/composer/composer/src/Composer/Package/Package.php
Set the conflicting packages
Package::setDevRequires in vendor/composer/composer/src/Composer/Package/Package.php
Set the recommended packages
Package::setProvides in vendor/composer/composer/src/Composer/Package/Package.php
Set the provided virtual packages
Package::setReplaces in vendor/composer/composer/src/Composer/Package/Package.php
Set the packages this one replaces
Package::setRequires in vendor/composer/composer/src/Composer/Package/Package.php
Set the required packages

File

vendor/composer/composer/src/Composer/Package/Package.php, line 721

Class

Package
Core package definitions that are needed to resolve dependencies and install packages

Namespace

Composer\Package

Code

private function convertLinksToMap(array $links, string $source) : array {
    trigger_error('Package::' . $source . ' must be called with a map of lowercased package name => Link object, got a indexed array, this is deprecated and you should fix your usage.');
    $newLinks = [];
    foreach ($links as $link) {
        $newLinks[$link->getTarget()] = $link;
    }
    return $newLinks;
}
RSS feed
Powered by Drupal