function BootableCommandTrait::getSitePath
Gets the site path.
Defaults to 'sites/default'. For testing purposes this can be overridden using the DRUPAL_DEV_SITE_PATH environment variable.
Return value
string The site path to use.
1 call to BootableCommandTrait::getSitePath()
- BootableCommandTrait::boot in core/
lib/ Drupal/ Core/ Command/ BootableCommandTrait.php - Boots up a Drupal environment.
File
-
core/
lib/ Drupal/ Core/ Command/ BootableCommandTrait.php, line 52
Class
- BootableCommandTrait
- Contains helper methods for console commands that boot up Drupal.
Namespace
Drupal\Core\CommandCode
protected function getSitePath() : string {
return getenv('DRUPAL_DEV_SITE_PATH') ?: 'sites/default';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.