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

Breadcrumb

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

function PluginInstaller::install

@inheritDoc

Overrides LibraryInstaller::install

File

vendor/composer/composer/src/Composer/Installer/PluginInstaller.php, line 80

Class

PluginInstaller
Installer for plugin packages

Namespace

Composer\Installer

Code

public function install(InstalledRepositoryInterface $repo, PackageInterface $package) {
    $promise = parent::install($repo, $package);
    if (!$promise instanceof PromiseInterface) {
        $promise = \React\Promise\resolve(null);
    }
    return $promise->then(function () use ($package, $repo) : void {
        try {
            Platform::workaroundFilesystemIssues();
            $this->getPluginManager()
                ->registerPackage($package, true);
        } catch (\Exception $e) {
            $this->rollbackInstall($e, $repo, $package);
        }
    });
}

API Navigation

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