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

Breadcrumb

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

function ConfigCommand::flattenSettingKeys

build a flat list of dot-separated setting-keys from given config

Parameters

array<mixed[]|string> $config:

Return value

string[]

1 call to ConfigCommand::flattenSettingKeys()
ConfigCommand::suggestSettingKeys in vendor/composer/composer/src/Composer/Command/ConfigCommand.php
Suggest setting-keys, while taking given options in account.

File

vendor/composer/composer/src/Composer/Command/ConfigCommand.php, line 1121

Class

ConfigCommand
@author Joshua Estes <Joshua.Estes@iostudio.com> @author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Command

Code

private function flattenSettingKeys(array $config, string $prefix = '') : array {
    $keys = [];
    foreach ($config as $key => $value) {
        $keys[] = [
            $prefix . $key,
        ];
        // array-lists must not be added to completion
        // sub-keys of repository-keys must not be added to completion
        if (is_array($value) && !array_is_list($value) && $prefix !== 'repositories.') {
            $keys[] = $this->flattenSettingKeys($value, $prefix . $key . '.');
        }
    }
    return array_merge(...$keys);
}

API Navigation

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