diff --git a/core/lib/Drupal/Core/Installer/Exception/ActiveConfigurationExistsException.php b/core/lib/Drupal/Core/Installer/Exception/ActiveConfigurationExistsException.php
index 8bdb3a7..a688d1e 100644
--- a/core/lib/Drupal/Core/Installer/Exception/ActiveConfigurationExistsException.php
+++ b/core/lib/Drupal/Core/Installer/Exception/ActiveConfigurationExistsException.php
@@ -17,10 +17,8 @@ class ActiveConfigurationExistsException extends AlreadyInstalledException {
/**
* {@inheritdoc}
*/
- public function __construct(TranslationInterface $string_translation) {
- $this->specificMessage = 'Active configuration already exists.';
-
- parent::__construct($string_translation);
+ public function __construct(TranslationInterface $string_translation, $message = '') {
+ parent::__construct($string_translation, $this->t('
Active configuration already exists.'));
}
}
diff --git a/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php b/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php
index e57c165..412b09b 100644
--- a/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php
+++ b/core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php
@@ -15,24 +15,20 @@
abstract class AlreadyInstalledException extends InstallerException {
/**
- * @var string
- * A specific message set from a class implementing this Exception.
- */
- protected $specificMessage = '';
-
- /**
* Constructs a new "already installed" exception.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation manager.
+ * @var string $specific_message
+ * A specific message set from a class implementing this Exception.
*/
- public function __construct(TranslationInterface $string_translation) {
+ public function __construct(TranslationInterface $string_translation, $specific_message = '') {
$this->stringTranslation = $string_translation;
$title = $this->t('Drupal already installed.');
$message = "\n";
- if ($message !== '') {
- $message .= $this->t('- ' . $this->specificMessage . '
');
+ if ($specific_message !== '') {
+ $message .= $this->t($specific_message);
}
$message .= $this->t('- To start over, you must empty your existing database and copy default.settings.php over settings.php.
- To upgrade an existing installation, proceed to the update script.
diff --git a/core/lib/Drupal/Core/Installer/Exception/DatabaseAlreadyPopulatedException.php b/core/lib/Drupal/Core/Installer/Exception/DatabaseAlreadyPopulatedException.php
index 08c5923..a65a51c 100644
--- a/core/lib/Drupal/Core/Installer/Exception/DatabaseAlreadyPopulatedException.php
+++ b/core/lib/Drupal/Core/Installer/Exception/DatabaseAlreadyPopulatedException.php
@@ -17,10 +17,8 @@ class DatabaseAlreadyPopulatedException extends AlreadyInstalledException {
/**
* {@inheritdoc}
*/
- public function __construct(TranslationInterface $string_translation) {
- $this->specificMessage = 'Database is already populated.';
-
- parent::__construct($string_translation);
+ public function __construct(TranslationInterface $string_translation, $message = '') {
+ parent::__construct($string_translation, $this->t('- Database is already populated.
'));
}
}
diff --git a/core/lib/Drupal/Core/Installer/Exception/InstallationTasksCompletedException.php b/core/lib/Drupal/Core/Installer/Exception/InstallationTasksCompletedException.php
index 6890ddf..16c0e40 100644
--- a/core/lib/Drupal/Core/Installer/Exception/InstallationTasksCompletedException.php
+++ b/core/lib/Drupal/Core/Installer/Exception/InstallationTasksCompletedException.php
@@ -17,10 +17,8 @@ class InstallationTasksCompletedException extends AlreadyInstalledException {
/**
* {@inheritdoc}
*/
- public function __construct(TranslationInterface $string_translation) {
- $this->specificMessage = 'Installation tasks have already been completed.';
-
- parent::__construct($string_translation);
+ public function __construct(TranslationInterface $string_translation, $message = '') {
+ parent::__construct($string_translation, $this->t('- Installation tasks have already been completed.
'));
}
}
diff --git a/core/lib/Drupal/Core/Installer/Exception/SettingsAlreadyExistsException.php b/core/lib/Drupal/Core/Installer/Exception/SettingsAlreadyExistsException.php
index 3d52053..40f6d0e 100644
--- a/core/lib/Drupal/Core/Installer/Exception/SettingsAlreadyExistsException.php
+++ b/core/lib/Drupal/Core/Installer/Exception/SettingsAlreadyExistsException.php
@@ -17,10 +17,8 @@ class SettingsAlreadyExistsException extends AlreadyInstalledException {
/**
* {@inheritdoc}
*/
- public function __construct(TranslationInterface $string_translation) {
- $this->specificMessage = 'Configured settings.php already exists.';
-
- parent::__construct($string_translation);
+ public function __construct(TranslationInterface $string_translation, $message = '') {
+ parent::__construct($string_translation, $this->t('- Configured settings.php already exists.
'));
}
}