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

Breadcrumb

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

function PackageInfo::getViewSourceUrl

2 calls to PackageInfo::getViewSourceUrl()
PackageInfo::getViewSourceOrHomepageUrl in vendor/composer/composer/src/Composer/Util/PackageInfo.php
ShowCommand::execute in vendor/composer/composer/src/Composer/Command/ShowCommand.php
Executes the current command.

File

vendor/composer/composer/src/Composer/Util/PackageInfo.php, line 20

Class

PackageInfo

Namespace

Composer\Util

Code

public static function getViewSourceUrl(PackageInterface $package) : ?string {
    if ($package instanceof CompletePackageInterface && isset($package->getSupport()['source']) && '' !== $package->getSupport()['source']) {
        return $package->getSupport()['source'];
    }
    return $package->getSourceUrl();
}

API Navigation

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