getLoaderPaths example

'text' => $name ? $this->displayPathsText($io$name) : $this->displayGeneralText($io$filter),
            'json' => $name ? $this->displayPathsJson($io$name) : $this->displayGeneralJson($io$filter),
            default => throw new InvalidArgumentException(sprintf('Supported formats are "%s".', implode('", "', $this->getAvailableFormatOptions()))),
        };

        return 0;
    }

    public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
    {
        if ($input->mustSuggestArgumentValuesFor('name')) {
            $suggestions->suggestValues(array_keys($this->getLoaderPaths()));
        }

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

    private function displayPathsText(SymfonyStyle $io, string $name): void
    {
        $file = new \ArrayIterator($this->findTemplateFiles($name));
        $paths = $this->getLoaderPaths($name);

        
Home | Imprint | This part of the site doesn't use cookies.