public static PreExistingConfigException::create($extension, array $config_objects)
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 objects that already exist in active configuration, keyed by config collection.
Return value
\Drupal\Core\Config\PreExistingConfigException
File
- core/lib/Drupal/Core/Config/PreExistingConfigException.php, line 58
Class
- PreExistingConfigException
- An exception thrown if configuration with the same name already exists.
Namespace
Drupal\Core\Config
Code
1 2 3 4 5 6 7 8 9 10 11 12 | public static function create( $extension , array $config_objects ) { $message = SafeMarkup::format( 'Configuration objects (@config_names) provided by @extension already exist in active configuration' , array ( '@config_names' => implode( ', ' , static ::flattenConfigObjects( $config_objects )), '@extension' => $extension ) ); $e = new static ( $message ); $e ->configObjects = $config_objects ; $e ->extension = $extension ; return $e ; } |
Please login to continue.