function RecipeCommand::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 RecipeCommand::getSitePath()
RecipeCommand::boot in core/lib/Drupal/Core/Recipe/RecipeCommand.php
Boots up a Drupal environment.

File

core/lib/Drupal/Core/Recipe/RecipeCommand.php, line 213

Class

RecipeCommand
Applies recipe.

Namespace

Drupal\Core\Recipe

Code

protected function getSitePath() {
    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.