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

Breadcrumb

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

class ZshCompletionOutput

@author Jitendra A <adhocore@gmail.com>

Hierarchy

  • class \Symfony\Component\Console\Completion\Output\ZshCompletionOutput implements \Symfony\Component\Console\Completion\Output\CompletionOutputInterface

Expanded class hierarchy of ZshCompletionOutput

1 file declares its use of ZshCompletionOutput
CompleteCommand.php in vendor/symfony/console/Command/CompleteCommand.php

File

vendor/symfony/console/Completion/Output/ZshCompletionOutput.php, line 20

Namespace

Symfony\Component\Console\Completion\Output
View source
class ZshCompletionOutput implements CompletionOutputInterface {
    public function write(CompletionSuggestions $suggestions, OutputInterface $output) : void {
        $values = [];
        foreach ($suggestions->getValueSuggestions() as $value) {
            $values[] = $value->getValue() . ($value->getDescription() ? "\t" . $value->getDescription() : '');
        }
        foreach ($suggestions->getOptionSuggestions() as $option) {
            $values[] = '--' . $option->getName() . ($option->getDescription() ? "\t" . $option->getDescription() : '');
            if ($option->isNegatable()) {
                $values[] = '--no-' . $option->getName() . ($option->getDescription() ? "\t" . $option->getDescription() : '');
            }
        }
        $output->write(implode("\n", $values) . "\n");
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ZshCompletionOutput::write public function Overrides CompletionOutputInterface::write
RSS feed
Powered by Drupal