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

Breadcrumb

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

function CompletionInput::fromTokens

Create an input based on an COMP_WORDS token list.

Parameters

string[] $tokens the set of split tokens (e.g. COMP_WORDS or argv):

int $currentIndex the index of the cursor (e.g. COMP_CWORD):

3 calls to CompletionInput::fromTokens()
CommandCompletionTester::complete in vendor/symfony/console/Tester/CommandCompletionTester.php
Create completion suggestions from input tokens.
CompleteCommand::createCompletionInput in vendor/symfony/console/Command/CompleteCommand.php
CompletionInput::fromString in vendor/symfony/console/Completion/CompletionInput.php
Converts a terminal string into tokens.

File

vendor/symfony/console/Completion/CompletionInput.php, line 58

Class

CompletionInput
An input specialized for shell completion.

Namespace

Symfony\Component\Console\Completion

Code

public static function fromTokens(array $tokens, int $currentIndex) : self {
    $input = new self($tokens);
    $input->tokens = $tokens;
    $input->currentIndex = $currentIndex;
    return $input;
}

API Navigation

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