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

Breadcrumb

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

function PluginManager::deactivatePackage

Deactivates a plugin package

If it's of type composer-installer it is unregistered from the installers instead for BC

Throws

\UnexpectedValueException

2 calls to PluginManager::deactivatePackage()
PluginManager::deactivateRepository in vendor/composer/composer/src/Composer/Plugin/PluginManager.php
Deactivate all plugins and installers from a repository
PluginManager::uninstallPackage in vendor/composer/composer/src/Composer/Plugin/PluginManager.php
Uninstall a plugin package

File

vendor/composer/composer/src/Composer/Plugin/PluginManager.php, line 314

Class

PluginManager
Plugin manager

Namespace

Composer\Plugin

Code

public function deactivatePackage(PackageInterface $package) : void {
    if (!isset($this->registeredPlugins[$package->getName()])) {
        return;
    }
    $plugin = $this->registeredPlugins[$package->getName()];
    unset($this->registeredPlugins[$package->getName()]);
    if ($plugin instanceof InstallerInterface) {
        $this->composer
            ->getInstallationManager()
            ->removeInstaller($plugin);
    }
    else {
        $this->removePlugin($plugin);
    }
}

API Navigation

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