function InstallCommand::isDrupalInstalled
Same name in other branches
- 9 core/lib/Drupal/Core/Command/InstallCommand.php \Drupal\Core\Command\InstallCommand::isDrupalInstalled()
- 8.9.x core/lib/Drupal/Core/Command/InstallCommand.php \Drupal\Core\Command\InstallCommand::isDrupalInstalled()
- 10 core/lib/Drupal/Core/Command/InstallCommand.php \Drupal\Core\Command\InstallCommand::isDrupalInstalled()
Returns whether there is already an existing Drupal installation.
Return value
bool
1 call to InstallCommand::isDrupalInstalled()
- InstallCommand::execute in core/
lib/ Drupal/ Core/ Command/ InstallCommand.php
File
-
core/
lib/ Drupal/ Core/ Command/ InstallCommand.php, line 127
Class
- InstallCommand
- Installs a Drupal site for local testing/development.
Namespace
Drupal\Core\CommandCode
protected function isDrupalInstalled() {
try {
$kernel = new DrupalKernel('prod', $this->classLoader, FALSE);
$kernel::bootEnvironment();
$kernel->setSitePath($this->getSitePath());
Settings::initialize($kernel->getAppRoot(), $kernel->getSitePath(), $this->classLoader);
$kernel->boot();
} catch (ConnectionNotDefinedException) {
return FALSE;
}
return !empty(Database::getConnectionInfo());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.