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

Breadcrumb

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

function ConfigInstaller::findDefaultConfigWithUnmetDependencies

Finds default configuration with unmet dependencies.

Parameters

\Drupal\Core\Config\StorageInterface $storage: The storage containing the default configuration.

array $enabled_extensions: A list of all the currently enabled modules and themes.

\Drupal\Core\Config\StorageInterface[] $profile_storages: An array of storage interfaces containing profile configuration to check for overrides.

Return value

array An array containing:

  • A list of configuration that has unmet dependencies.
  • An array that will be filled with the missing dependency names, keyed by the dependents' names.
1 call to ConfigInstaller::findDefaultConfigWithUnmetDependencies()
ConfigInstaller::checkConfigurationToInstall in core/lib/Drupal/Core/Config/ConfigInstaller.php
Checks the configuration that will be installed for an extension.

File

core/lib/Drupal/Core/Config/ConfigInstaller.php, line 560

Class

ConfigInstaller

Namespace

Drupal\Core\Config

Code

protected function findDefaultConfigWithUnmetDependencies(StorageInterface $storage, array $enabled_extensions, array $profile_storages = []) {
    $missing_dependencies = [];
    $config_to_create = $this->getConfigToCreate($storage, StorageInterface::DEFAULT_COLLECTION, '', $profile_storages);
    $all_config = array_merge($this->configFactory
        ->listAll(), array_keys($config_to_create));
    foreach ($config_to_create as $config_name => $config) {
        if ($missing = $this->getMissingDependencies($config_name, $config, $enabled_extensions, $all_config)) {
            $missing_dependencies[$config_name] = $missing;
        }
    }
    return [
        array_intersect_key($config_to_create, $missing_dependencies),
        $missing_dependencies,
    ];
}

API Navigation

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