Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InstallCommand.php

function InstallCommand::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.

2 calls to InstallCommand::getSitePath()
InstallCommand::execute in core/lib/Drupal/Core/Command/InstallCommand.php
Executes the current command.
InstallCommand::isDrupalInstalled in core/lib/Drupal/Core/Command/InstallCommand.php
Returns whether there is already an existing Drupal installation.

File

core/lib/Drupal/Core/Command/InstallCommand.php, line 269

Class

InstallCommand
Installs a Drupal site for local testing/development.

Namespace

Drupal\Core\Command

Code

protected function getSitePath() {
    return getenv('DRUPAL_DEV_SITE_PATH') ?: 'sites/default';
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal