completeOptions example



    public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
    {
        if ($input->mustSuggestArgumentValuesFor('class')) {
            $suggestions->suggestValues(array_merge($this->getCoreTypes()$this->types));

            return;
        }

        if ($input->mustSuggestArgumentValuesFor('option') && null !== $class = $input->getArgument('class')) {
            $this->completeOptions($class$suggestions);

            return;
        }

        if ($input->mustSuggestOptionValuesFor('format')) {
            $suggestions->suggestValues($this->getAvailableFormatOptions());
        }
    }

    private function completeOptions(string $class, CompletionSuggestions $suggestions): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.