You are here

public static function UnmetDependenciesException::create in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/UnmetDependenciesException.php \Drupal\Core\Config\UnmetDependenciesException::create()

Creates an exception for an extension and a list of configuration objects.

Parameters

$extension: The name of the extension that is being installed.

array $config_objects: A list of configuration object names that have unmet dependencies

Return value

\Drupal\Core\Config\PreExistingConfigException

1 call to UnmetDependenciesException::create()
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/UnmetDependenciesException.php, line 82
Contains \Drupal\Core\Config\UnmetDependenciesException.

Class

UnmetDependenciesException
An exception thrown if configuration has unmet dependencies.

Namespace

Drupal\Core\Config

Code

public static function create($extension, array $config_objects) {
  $message = SafeMarkup::format('Configuration objects (@config_names) provided by @extension have unmet dependencies', array(
    '@config_names' => implode(', ', $config_objects),
    '@extension' => $extension,
  ));
  $e = new static($message);
  $e->configObjects = $config_objects;
  $e->extension = $extension;
  return $e;
}