comparison core/lib/Drupal/Core/Config/PreExistingConfigException.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php 1 <?php
2 2
3 namespace Drupal\Core\Config; 3 namespace Drupal\Core\Config;
4 4
5 use Drupal\Component\Utility\SafeMarkup; 5 use Drupal\Component\Render\FormattableMarkup;
6 6
7 /** 7 /**
8 * An exception thrown if configuration with the same name already exists. 8 * An exception thrown if configuration with the same name already exists.
9 */ 9 */
10 class PreExistingConfigException extends ConfigException { 10 class PreExistingConfigException extends ConfigException {
54 * configuration, keyed by config collection. 54 * configuration, keyed by config collection.
55 * 55 *
56 * @return \Drupal\Core\Config\PreExistingConfigException 56 * @return \Drupal\Core\Config\PreExistingConfigException
57 */ 57 */
58 public static function create($extension, array $config_objects) { 58 public static function create($extension, array $config_objects) {
59 $message = SafeMarkup::format('Configuration objects (@config_names) provided by @extension already exist in active configuration', 59 $message = new FormattableMarkup('Configuration objects (@config_names) provided by @extension already exist in active configuration',
60 [ 60 [
61 '@config_names' => implode(', ', static::flattenConfigObjects($config_objects)), 61 '@config_names' => implode(', ', static::flattenConfigObjects($config_objects)),
62 '@extension' => $extension 62 '@extension' => $extension,
63 ] 63 ]
64 ); 64 );
65 $e = new static($message); 65 $e = new static($message);
66 $e->configObjects = $config_objects; 66 $e->configObjects = $config_objects;
67 $e->extension = $extension; 67 $e->extension = $extension;