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

Breadcrumb

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

function Command::complete

Supplies suggestions when resolving possible completion options for input (e.g. option or argument).

2 calls to Command::complete()
BaseCommand::complete in vendor/composer/composer/src/Composer/Command/BaseCommand.php
@inheritdoc
BaseCommand::complete in vendor/composer/composer/src/Composer/Command/BaseCommand.php
@inheritdoc
5 methods override Command::complete()
BaseCommand::complete in vendor/composer/composer/src/Composer/Command/BaseCommand.php
@inheritdoc
LazyCommand::complete in vendor/symfony/console/Command/LazyCommand.php
Supplies suggestions when resolving possible completion options for input (e.g. option or argument).
LintCommand::complete in vendor/symfony/yaml/Command/LintCommand.php
Supplies suggestions when resolving possible completion options for input (e.g. option or argument).
ServerDumpCommand::complete in vendor/symfony/var-dumper/Command/ServerDumpCommand.php
Supplies suggestions when resolving possible completion options for input (e.g. option or argument).
TraceableCommand::complete in vendor/symfony/console/Command/TraceableCommand.php
Supplies suggestions when resolving possible completion options for input (e.g. option or argument).

File

vendor/symfony/console/Command/Command.php, line 288

Class

Command
Base class for all commands.

Namespace

Symfony\Component\Console\Command

Code

public function complete(CompletionInput $input, CompletionSuggestions $suggestions) : void {
    $definition = $this->getDefinition();
    if (CompletionInput::TYPE_OPTION_VALUE === $input->getCompletionType() && $definition->hasOption($input->getCompletionName())) {
        $definition->getOption($input->getCompletionName())
            ->complete($input, $suggestions);
    }
    elseif (CompletionInput::TYPE_ARGUMENT_VALUE === $input->getCompletionType() && $definition->hasArgument($input->getCompletionName())) {
        $definition->getArgument($input->getCompletionName())
            ->complete($input, $suggestions);
    }
}

API Navigation

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