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

Breadcrumb

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

function InstallationManager::isPackageInstalled

Checks whether provided package is installed in one of the registered installers.

Parameters

InstalledRepositoryInterface $repo repository in which to check:

PackageInterface $package package instance:

File

vendor/composer/composer/src/Composer/Installer/InstallationManager.php, line 142

Class

InstallationManager
Package operation manager.

Namespace

Composer\Installer

Code

public function isPackageInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) : bool {
    if ($package instanceof AliasPackage) {
        return $repo->hasPackage($package) && $this->isPackageInstalled($repo, $package->getAliasOf());
    }
    return $this->getInstaller($package->getType())
        ->isInstalled($repo, $package);
}

API Navigation

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