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

Breadcrumb

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

function CompleteCommand::createCompletionInput

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

File

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

Class

CompleteCommand
Responsible for providing the values to the shell completion.

Namespace

Symfony\Component\Console\Command

Code

private function createCompletionInput(InputInterface $input) : CompletionInput {
    $currentIndex = $input->getOption('current');
    if (!$currentIndex || !ctype_digit($currentIndex)) {
        throw new \RuntimeException('The "--current" option must be set and it must be an integer.');
    }
    $completionInput = CompletionInput::fromTokens($input->getOption('input'), (int) $currentIndex);
    try {
        $completionInput->bind($this->getApplication()
            ->getDefinition());
    } catch (ExceptionInterface) {
    }
    return $completionInput;
}

API Navigation

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