Deactivate a plugin.

@param  \Composer\Composer  $composer
@param  \Composer\IO\IOInterface  $io
@param  string  $plugin
@return void
489453
public function deactivate(Composer $composer, IOInterface $io, $pluginName)
    {
        $plugin = $this->prepare(__FUNCTION__, $composer, $io, $pluginName);
        
        if ($plugin) {
            $result = $this->wp(function () use ($plugin) {
                return deactivate_plugins($plugin);
            });
            
            $this->succeeded(__FUNCTION__, $pluginName, $result === null);
        }
    }
75090
private function executePluginInstall(Plugin $plugin)
    {
        try {
            $plugin->install();
        } catch (\Exception $e) {
            throw new \Piwik\Plugin\PluginException($plugin->getPluginName(), $e->getMessage());
        }
    }
378377
protected function excluded($action, $plugin)
    {
        $this->io->write('<warning>The plugin ' . $plugin . ' was not ' . $this->getActionPast($action) . ' because it is known to cause issues.</warning>');
        $this->io->write('<info>You can still activate this plugin manually.</info>');
        $this->io->write('');
    }
548596
protected function shouldRemoveComposerAuthorInformation( InputInterface $input, OutputInterface $output ) {
		$helper = $this->getHelper( 'question' );

		$question = new ConfirmationQuestion(
			'Would you like to remove author information from composer.json? <info>[y/N]</info> ',
			false
		);

		$install = $helper->ask( $input, $output, $question );
		$output->writeln( '' );

		return $install;
	}
1236433
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $packages = explode(',', $input->getArgument('package'));
        $type = $input->getOption('type');

        foreach ($packages as $package) {
            $output->writeln('### Orchestrator::installComposerPackage() for '.$package.' and type: '.$type.'  ###');
            Orchestrator::installComposerPackage($package, $type);
        }
    }
1337335
public void deactivate(ComponentContext cc) throws IOException {
        ConfigProviderResolver.setInstance(null);
        shutdown();
        scheduledExecutorServiceRef.deactivate(cc);
    }
1354986
public function registerPlugin(array $plugin)
    {
        /* Dont't process nameless plugins */
        if(! isset($plugin['name'])) return;

        /* Create a container for the plugin */
        $this->getContainer()->addPlugin($plugin['name']);

        /* Commands are registered first so they can be found be porcedures */
        if(isset($plugin['commands'])) {
            $this->registerCommands($plugin['name'], $plugin['commands']);
        }

        if(isset($plugin['procedures'])) {
            /* The path info is appended by ComposerScripts */
            $this->registerProcedures($plugin['name'], $plugin['procedures'], $plugin['path']);
        }

        if(isset($plugin['settings'])) {
            $this->registerSettings($plugin['name'], $plugin[ 'settings' ]);
        }
    }
1218380
public function registerPlugin($plugin, $pluginId = null)
    {
        if (!$pluginId) {
            $pluginId = $this->getIdentifier($plugin);
        }

        if (!$plugin) {
            return;
        }

        $pluginPath = $this->getPluginPath($plugin);
        $pluginNamespace = strtolower($pluginId);

        /*
         * Register language namespaces
         */
        $langPath = $pluginPath . '/lang';
        if (File::isDirectory($langPath)) {
            Lang::addNamespace($pluginNamespace, $langPath);
        }

        if ($plugin->disabled) {
            return;
        }

        /*
         * Register plugin class autoloaders
         */
        $autoloadPath = $pluginPath . '/vendor/autoload.php';
        if (File::isFile($autoloadPath)) {
            ComposerManager::instance()->autoload($pluginPath . '/vendor');
        }

        if (!self::$noInit || $plugin->elevated) {
            $plugin->register();
        }

        /*
         * Register configuration path
         */
        $configPath = $pluginPath . '/config';
        if (File::isDirectory($configPath)) {
            Config::package($pluginNamespace, $configPath, $pluginNamespace);
        }

        /*
         * Register views path
         */
        $viewsPath = $pluginPath . '/views';
        if (File::isDirectory($viewsPath)) {
            View::addNamespace($pluginNamespace, $viewsPath);
        }

        /*
         * Add init, if available
         */
        $initFile = $pluginPath . '/init.php';
        if (!self::$noInit && File::exists($initFile)) {
            require $initFile;
        }

        /*
         * Add routes, if available
         */
        $routesFile = $pluginPath . '/routes.php';
        if (File::exists($routesFile)) {
            require $routesFile;
        }
    }
270139
public function activate(Composer $composer, IOInterface $ioc)
    {
        $installer = new Installer($ioc, $composer);
        /** @type InstallationManager $manager */
        $manager = $composer->getInstallationManager();
        $manager->addInstaller($installer);
    }
1015951
public function register(PluginBundleInterface $plugin)
    {
        $this->validate($plugin, false);

        return $this->dbWriter->insert($plugin, $this->validator->getPluginConfiguration());
    }
647139
public function deactivateWordPressPlugin(PackageEvent $event)
    {
        if (! $this->isWordPressPlugin($this->getPackage($event))) {
            return;
        }
        
        static::$plugin->getInstanceOf(PluginInteractor::class)->deactivate(
            $event->getComposer(),
            $event->getIO(),
            preg_replace('/^wpackagist-plugin\//', '', $this->getPackageName($event))
        );
    }
173007
public function activate(Composer $composer, IOInterface $inputOutput)
    {
        $this->composer = $composer;
        $this->inputOutput = $inputOutput;

        $packageDirectory = $this->composer->getConfig()->get('vendor-dir')
            . DIRECTORY_SEPARATOR . 'zooroyal' . DIRECTORY_SEPARATOR . 'coding-standard';
        $this->process = new Process('npm install --prefix ' . $packageDirectory);
        $this->process->setTimeout(300);
    }
476326
public function activate(Composer $composer, IOInterface $io)
    {
        $this->runner = new Runner($composer, $io);
        $processBuilder = new ProcessBuilder();
        $this->runner->registerInstaller(new Npm($io));
        $this->runner->registerInstaller(new Bower($io));
        $this->runner->registerBuildTool(new Grunt($io));
        $this->finder = new Finder($composer, static::PACKAGE);
    }
1170811
public function activate(Composer $composer, IOInterface $io)
    {
        $managers = [];
        $this->composer = $composer;
        $this->io = $io;
        foreach ($this->managers as $name => $class) {
            $managers[$name] = new $class($this);
        }
        $this->managers = $managers;

        #$rm = $composer->getRepositoryManager();

        #$rm->setRepositoryClass('assets', 'hiqdev\composerassetplugin\AssetRepository');
        #$rm->addRepository($rm->createRepository('assets', ['plugin' => $this]));
    }
926190
public function disableAction(Plugin $plugin)
    {
        $this->pluginManager->disable($plugin);

        return new JsonResponse(
            $this->pluginManager->getPluginsData()
        );
    }
903835
protected function initMultiVcsRepositories(Composer $composer, IOInterface $io)
    {
        $repoDownloader = new GitMultiRepoDownloader($io, $composer->getConfig());
        foreach ($this->getVcsTypes() as $type) {
            $composer->getDownloadManager()
                ->setDownloader($type, $repoDownloader);
            $composer->getRepositoryManager()
                ->setRepositoryClass($type, $this->getMultiRepositoryClassName());
        }

        return $this;
    }
64407
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new SymfonyStyle($input, $output);
        $context = Context::createDefaultContext();
        $plugins = $this->prepareExecution(self::LIFECYCLE_METHOD, $io, $input, $context);

        $installedPluginCount = 0;
        /** @var PluginEntity $plugin */
        foreach ($plugins as $plugin) {
            if ($input->getOption('reinstall') && $plugin->getInstalledAt()) {
                $this->pluginLifecycleService->uninstallPlugin($plugin, $context);
            }

            if ($input->getOption('activate') && $plugin->getInstalledAt() && $plugin->getActive() === false) {
                $io->note(sprintf('Plugin "%s" is already installed. Activating.', $plugin->getName()));
                $this->pluginLifecycleService->activatePlugin($plugin, $context);

                continue;
            }

            if ($plugin->getInstalledAt()) {
                $io->note(sprintf('Plugin "%s" is already installed. Skipping.', $plugin->getName()));

                continue;
            }

            $activationSuffix = '';
            $message = 'Plugin "%s" has been installed%s successfully.';

            $this->pluginLifecycleService->installPlugin($plugin, $context);
            ++$installedPluginCount;

            if ($input->getOption('activate')) {
                $this->pluginLifecycleService->activatePlugin($plugin, $context);
                $activationSuffix = ' and activated';
            }

            $io->text(sprintf($message, $plugin->getName(), $activationSuffix));
        }

        if ($installedPluginCount !== 0) {
            $io->success(sprintf('Installed %d plugin(s).', $installedPluginCount));
        }
    }