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

Breadcrumb

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

function ShowCommand::suggestPackageBasedOnMode

File

vendor/composer/composer/src/Composer/Command/ShowCommand.php, line 122

Class

ShowCommand
@author Robert Schönthal <seroscho@googlemail.com> @author Jordi Boggiano <j.boggiano@seld.be> @author Jérémy Romey <jeremyFreeAgent> @author Mihai Plasoianu <mihai@plasoianu.de>

Namespace

Composer\Command

Code

protected function suggestPackageBasedOnMode() : \Closure {
    return function (CompletionInput $input) {
        if ($input->getOption('available') || $input->getOption('all')) {
            return $this->suggestAvailablePackageInclPlatform()($input);
        }
        if ($input->getOption('platform')) {
            return $this->suggestPlatformPackage()($input);
        }
        return $this->suggestInstalledPackage(false)($input);
    };
}
RSS feed
Powered by Drupal