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

Breadcrumb

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

function ConfigInstaller::validateDependencies

Validates an array of config data that contains dependency information.

Parameters

string $config_name: The name of the configuration object that is being validated.

array $data: Configuration data.

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

array $all_config: A list of all the active configuration names.

Return value

bool TRUE if all dependencies are present, FALSE otherwise.

1 call to ConfigInstaller::validateDependencies()
ConfigInstaller::installOptionalConfig in core/lib/Drupal/Core/Config/ConfigInstaller.php
Installs optional configuration.

File

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

Class

ConfigInstaller

Namespace

Drupal\Core\Config

Code

protected function validateDependencies($config_name, array $data, array $enabled_extensions, array $all_config) {
    if (!isset($data['dependencies'])) {
        // Simple config or a config entity without dependencies.
        [
            $provider,
        ] = explode('.', $config_name, 2);
        return in_array($provider, $enabled_extensions, TRUE);
    }
    $missing = $this->getMissingDependencies($config_name, $data, $enabled_extensions, $all_config);
    return empty($missing);
}

API Navigation

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