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

Breadcrumb

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

function CompleteCommand::findCommand

1 call to CompleteCommand::findCommand()
CompleteCommand::execute in vendor/symfony/console/Command/CompleteCommand.php
Executes the current command.

File

vendor/symfony/console/Command/CompleteCommand.php, line 188

Class

CompleteCommand
Responsible for providing the values to the shell completion.

Namespace

Symfony\Component\Console\Command

Code

private function findCommand(CompletionInput $completionInput) : ?Command {
    try {
        $inputName = $completionInput->getFirstArgument();
        if (null === $inputName) {
            return null;
        }
        return $this->getApplication()
            ->find($inputName);
    } catch (CommandNotFoundException) {
    }
    return null;
}
RSS feed
Powered by Drupal