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

Breadcrumb

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

function DumpCompletionCommand::getSupportedShells

Return value

string[]

2 calls to DumpCompletionCommand::getSupportedShells()
DumpCompletionCommand::configure in vendor/symfony/console/Command/DumpCompletionCommand.php
Configures the current command.
DumpCompletionCommand::execute in vendor/symfony/console/Command/DumpCompletionCommand.php
Executes the current command.

File

vendor/symfony/console/Command/DumpCompletionCommand.php, line 134

Class

DumpCompletionCommand
Dumps the completion script for the current shell.

Namespace

Symfony\Component\Console\Command

Code

private function getSupportedShells() : array {
    if (isset($this->supportedShells)) {
        return $this->supportedShells;
    }
    $shells = [];
    foreach (new \DirectoryIterator(__DIR__ . '/../Resources/') as $file) {
        if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) {
            $shells[] = $file->getExtension();
        }
    }
    sort($shells);
    return $this->supportedShells = $shells;
}
RSS feed
Powered by Drupal