class AlreadyInstalledException in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Installer/Exception/AlreadyInstalledException.php \Drupal\Core\Installer\Exception\AlreadyInstalledException
Exception thrown if Drupal is installed already.
Hierarchy
- class \Drupal\Core\Installer\Exception\InstallerException extends \Drupal\Core\Installer\Exception\RuntimeException uses StringTranslationTrait
- class \Drupal\Core\Installer\Exception\AlreadyInstalledException
Expanded class hierarchy of AlreadyInstalledException
1 file declares its use of AlreadyInstalledException
- install.core.inc in core/
includes/ install.core.inc - API functions for installing Drupal.
File
- core/
lib/ Drupal/ Core/ Installer/ Exception/ AlreadyInstalledException.php, line 15 - Contains \Drupal\Core\Installer\Exception\AlreadyInstalledException.
Namespace
Drupal\Core\Installer\ExceptionView source
class AlreadyInstalledException extends InstallerException {
/**
* Constructs a new "already installed" exception.
*
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation manager.
*/
public function __construct(TranslationInterface $string_translation) {
$this->stringTranslation = $string_translation;
$title = $this
->t('Drupal already installed');
$message = $this
->t('<ul>
<li>To start over, you must empty your existing database and copy <em>default.settings.php</em> over <em>settings.php</em>.</li>
<li>To upgrade an existing installation, proceed to the <a href=":update-url">update script</a>.</li>
<li>View your <a href=":base-url">existing site</a>.</li>
</ul>', array(
':base-url' => $GLOBALS['base_url'],
':update-url' => $GLOBALS['base_path'] . 'update.php',
));
parent::__construct($message, $title);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AlreadyInstalledException:: |
public | function |
Constructs a new "already installed" exception. Overrides InstallerException:: |
|
InstallerException:: |
protected | property | The page title to output. | |
InstallerException:: |
public | function | Returns the exception page title. | |
StringTranslationTrait:: |
protected | property | The string translation service. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |